Thorin 1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
pipelinebuilder.cpp
Go to the documentation of this file.
2
3#include "thorin/def.h"
4#include "thorin/lattice.h"
5#include "thorin/plugin.h"
6
10#include "thorin/pass/pass.h"
14#include "thorin/phase/phase.h"
15
16namespace thorin {
17
18void PipelineBuilder::def2pass(const Def* def, Pass* p) {
19 def->world().DLOG("associating {} with {}", def->gid(), p);
20 def2pass_[def] = p;
21}
22Pass* PipelineBuilder::pass(const Def* def) { return def2pass_[def]; }
23
24void PipelineBuilder::begin_pass_phase() { man = std::make_unique<PassMan>(world_); }
26 std::unique_ptr<thorin::PassMan>&& pass_man_ref = std::move(man);
27 pipe->add<PassManPhase>(std::move(pass_man_ref));
28 man = nullptr;
29}
30
31void PipelineBuilder::run_pipeline() { pipe->run(); }
32
33} // namespace thorin
Base class for all Defs.
Definition def.h:222
u32 gid() const
Definition def.h:238
World & world() const
Definition def.cpp:421
Wraps a PassMan pipeline as a Phase.
Definition phase.h:101
All Passes that want to be registered in the PassMan must implement this interface.
Definition pass.h:22
Pass * pass(const Def *)
void def2pass(const Def *, Pass *p)
Definition cfg.h:11