MimIR
0.4-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
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
extern
"C"
MIM_EXPORT
Plugin
mim_get_plugin
() {
22
return
{
"refly"
,
MIM_VERSION
,
refly::register_normalizers
,
reg_phases
, {}, {}, {}, {}};
23
}
reg_phases
void reg_phases(Flags2Phases &phases)
Definition
affine.cpp:12
mim::Axm::isa
static auto isa(const Def *def)
Definition
axm.h:112
config.h
MIM_EXPORT
#define MIM_EXPORT
Definition
config.h:21
mim::plug::refly::remove_dbg_repl
remove_dbg_repl
Definition
autogen.h:134
mim::plug::refly::dbg::perm
@ perm
Definition
autogen.h:90
mim::plug::refly::register_normalizers
void register_normalizers(Normalizers &normalizers)
mim::plug
Definition
lower_for.h:5
mim
Definition
ast.h:16
mim::Flags2Phases
absl::flat_hash_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
mim::mim_get_plugin
mim::Plugin mim_get_plugin()
phase.h
MIM_REPL
#define MIM_REPL(__phases, __annex,...)
Definition
phase.h:547
MIM_VERSION
#define MIM_VERSION
Definition
plugin.h:149
refly.h
mim::Plugin
Basic info and registration function pointer to be returned from a specific plugin.
Definition
plugin.h:154
src
mim
plug
refly
refly.cpp
Generated by
1.18.0