MimIR
0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
pipelinebuilder.cpp
Go to the documentation of this file.
1
#include "
mim/pass/pipelinebuilder.h
"
2
3
#include "
mim/def.h
"
4
#include "
mim/lattice.h
"
5
#include "
mim/plugin.h
"
6
7
#include "
mim/pass/beta_red.h
"
8
#include "
mim/pass/eta_exp.h
"
9
#include "
mim/pass/eta_red.h
"
10
#include "
mim/pass/pass.h
"
11
#include "
mim/pass/ret_wrap.h
"
12
#include "
mim/pass/scalarize.h
"
13
#include "
mim/pass/tail_rec_elim.h
"
14
#include "
mim/phase/phase.h
"
15
16
namespace
mim
{
17
18
void
PipelineBuilder::def2pass
(
const
Def
* def,
Pass
* p) {
19
def->
world
().DLOG(
"associating {} with {}"
, def->
gid
(), p);
20
def2pass_[def] = p;
21
}
22
Pass
*
PipelineBuilder::pass
(
const
Def
* def) {
return
def2pass_[def]; }
23
24
void
PipelineBuilder::begin_pass_phase
() { man = std::make_unique<PassMan>(world_); }
25
void
PipelineBuilder::end_pass_phase
() {
26
std::unique_ptr<mim::PassMan>&& pass_man_ref = std::move(man);
27
pipe->add<
PassManPhase
>(std::move(pass_man_ref));
28
man =
nullptr
;
29
}
30
31
void
PipelineBuilder::run_pipeline
() { pipe->run(); }
32
33
}
// namespace mim
beta_red.h
mim::Def
Base class for all Defs.
Definition
def.h:223
mim::Def::world
World & world() const
Definition
def.cpp:415
mim::Def::gid
u32 gid() const
Definition
def.h:239
mim::PassManPhase
Wraps a PassMan pipeline as a Phase.
Definition
phase.h:100
mim::Pass
All Passes that want to be registered in the PassMan must implement this interface.
Definition
pass.h:22
mim::PipelineBuilder::def2pass
void def2pass(const Def *, Pass *p)
Definition
pipelinebuilder.cpp:18
mim::PipelineBuilder::run_pipeline
void run_pipeline()
Definition
pipelinebuilder.cpp:31
mim::PipelineBuilder::pass
Pass * pass(const Def *)
Definition
pipelinebuilder.cpp:22
mim::PipelineBuilder::begin_pass_phase
void begin_pass_phase()
Definition
pipelinebuilder.cpp:24
mim::PipelineBuilder::end_pass_phase
void end_pass_phase()
Definition
pipelinebuilder.cpp:25
def.h
eta_exp.h
eta_red.h
lattice.h
mim
Definition
cfg.h:11
pass.h
phase.h
pipelinebuilder.h
plugin.h
ret_wrap.h
scalarize.h
tail_rec_elim.h
src
mim
pass
pipelinebuilder.cpp
Generated by
1.12.0