MimIR
0.5-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
Loading...
Searching...
No Matches
refly.cpp
Go to the documentation of this file.
1
#include "
mim/plug/refly/refly.h
"
2
3
#include <
mim/config.h
>
4
#include <
mim/phase.h
>
5
6
using namespace
mim
;
7
using namespace
mim::plug
;
8
9
static
void
reg_phases
(
Flags2Phases
& phases) {
10
MIM_REPL
(phases,
refly::remove_dbg_repl
, {
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
21
MIM_PLUGIN_ENTRY
(
refly
) {
22
plugin.register_normalizers =
refly::register_normalizers
;
23
plugin.register_phases =
reg_phases
;
24
}
mim::Axm::isa
static auto isa(const Def *def)
Definition
axm.h:112
config.h
mim::plug::refly
The refly Plugin
Definition
normalizers.cpp:10
mim::plug::refly::remove_dbg_repl
remove_dbg_repl
Definition
autogen.h:140
mim::plug::refly::dbg::perm
@ perm
Definition
autogen.h:90
mim::plug::refly::register_normalizers
void register_normalizers(Normalizers &normalizers)
mim::plug
Definition
affine.h:10
mim
Definition
ast.h:16
mim::Flags2Phases
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
phase.h
MIM_REPL
#define MIM_REPL(__phases, __annex,...)
Definition
phase.h:457
MIM_PLUGIN_ENTRY
#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
reg_phases
static void reg_phases(Flags2Phases &phases)
Definition
refly.cpp:9
refly.h
src
mim
plug
refly
refly.cpp
Generated by
1.18.0