Thorin
1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
remove_perm.cpp
Go to the documentation of this file.
1
#include "
thorin/plug/refly/pass/remove_perm.h
"
2
3
#include "
thorin/plug/refly/refly.h
"
4
5
namespace
thorin::plug::refly
{
6
7
Ref
RemoveDbgPerm::rewrite
(
Ref
def) {
8
if
(
auto
dbg_perm =
match
(
dbg::perm
, def)) {
9
auto
[lvl, x] = dbg_perm->args<2>();
10
world
().DLOG(
"dbg_perm: {}"
, x);
11
return
x;
12
}
13
14
return
def;
15
}
16
17
}
// namespace thorin::plug::refly
thorin::Pass::world
World & world()
Definition
pass.h:296
thorin::Ref
Helper class to retrieve Infer::arg if present.
Definition
def.h:87
thorin::plug::refly::RemoveDbgPerm::rewrite
Ref rewrite(Ref) override
Definition
remove_perm.cpp:7
thorin::plug::refly
The refly Plugin
Definition
remove_perm.h:7
thorin::plug::refly::perm
@ perm
Definition
autogen.h:122
thorin::match
auto match(Ref def)
Definition
axiom.h:105
refly.h
remove_perm.h
src
thorin
plug
refly
pass
remove_perm.cpp
Generated by
1.9.8