MimIR 0.1
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
9void reg_stages(Flags2Stages& stages) {
11 if (auto dbg_perm = Axm::isa(refly::dbg::perm, def)) {
12 auto [lvl, x] = dbg_perm->args<2>();
13 DLOG("dbg_perm: {}", x);
14 return x;
15 }
16
17 return {};
18 });
19}
20
21extern "C" MIM_EXPORT Plugin mim_get_plugin() { return {"refly", refly::register_normalizers, reg_stages, nullptr}; }
void reg_stages(Flags2Stages &stages)
Definition affine.cpp:11
static auto isa(const Def *def)
Definition axm.h:107
#define MIM_EXPORT
Definition config.h:16
#define DLOG(...)
Vaporizes to nothingness in Debug build.
Definition log.h:95
void register_normalizers(Normalizers &normalizers)
Definition ast.h:14
absl::flat_hash_map< flags_t, std::function< std::unique_ptr< Stage >(World &)> > Flags2Stages
Maps an an axiom of a Stage to a function that creates one.
Definition plugin.h:22
mim::Plugin mim_get_plugin()
#define MIM_REPL(__stages, __annex,...)
Definition phase.h:141
void reg_stages(Flags2Stages &stages)
Definition refly.cpp:9
Basic info and registration function pointer to be returned from a specific plugin.
Definition plugin.h:30