MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
refly.cpp
Go to the documentation of this file.
2
3#include <mim/config.h>
4#include <mim/phase.h>
5
6using namespace mim;
7using namespace mim::plug;
8
9static void reg_phases(Flags2Phases& phases) {
11 if (auto dbg_perm = Axm::isa(refly::dbg::perm, def)) {
12 auto [lvl, x] = dbg_perm->args<2>();
13 log().d("dbg perm: {}", x);
14 return x;
15 }
16
17 return {};
18 });
19}
20
22 plugin.register_normalizers = refly::register_normalizers;
23 plugin.register_phases = reg_phases;
24}
static auto isa(const Def *def)
Definition axm.h:112
The refly Plugin
void register_normalizers(Normalizers &normalizers)
Definition ast.h:16
ankerl::unordered_dense::map< flags_t, std::function< std::unique_ptr< Phase >(World &)> > Flags2Phases
Maps an axiom of a Phase to a function that creates one.
Definition plugin.h:30
#define MIM_REPL(__phases, __annex,...)
Definition phase.h:457
#define MIM_PLUGIN_ENTRY(p)
Defines a Plugin's entry point; the body fills in the plugin handed to it, as in MIM_PLUGIN_ENTRY(dem...
Definition plugin.h:196
static void reg_phases(Flags2Phases &phases)
Definition refly.cpp:9