MimIR
0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
internal_cleanup.cpp
Go to the documentation of this file.
1
#include "
mim/plug/compile/pass/internal_cleanup.h
"
2
3
#include <iostream>
4
5
#include <
mim/lam.h
>
6
7
namespace
mim::plug::compile
{
8
9
void
InternalCleanup::enter
() {
10
Lam
* lam =
curr_mut
();
11
if
(lam->
sym
().view().starts_with(prefix_)) {
12
lam->
make_internal
();
13
world
().DLOG(
"internalized {}"
, lam);
14
}
15
}
16
17
}
// namespace mim::plug::compile
mim::Def::make_internal
void make_internal()
Definition
def.cpp:509
mim::Def::sym
Sym sym() const
Definition
def.h:468
mim::Lam
A function.
Definition
lam.h:103
mim::Pass::world
World & world()
Definition
pass.h:296
mim::RWPass< InternalCleanup, Lam >::curr_mut
Lam * curr_mut() const
Definition
pass.h:232
mim::plug::compile::InternalCleanup::enter
void enter() override
Invoked just before Pass::rewriteing PassMan::curr_mut's body.
Definition
internal_cleanup.cpp:9
internal_cleanup.h
lam.h
mim::plug::compile
The compile Plugin
Definition
compile.h:8
src
mim
plug
compile
pass
internal_cleanup.cpp
Generated by
1.12.0