MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
eta_red_phase.h
Go to the documentation of this file.
1#pragma once
2
3#include "mim/phase.h"
4
5namespace mim {
6
7/// Inlines in post-order all Lam%s that occur exactly *once* in the program.
8class EtaRedPhase : public RWPhase {
9public:
11 : RWPhase(world, "EtaRedPhase") {}
14
15private:
16 void rewrite_external(Def*) final;
17 const Def* rewrite_no_eta(const Def* def) { return Rewriter::rewrite(def); }
18 const Def* rewrite(const Def*);
19 const Def* rewrite_imm_Var(const Var*) final;
20};
21
22} // namespace mim
Base class for all Defs.
Definition def.h:251
EtaRedPhase(World &world)
const Def * rewrite_imm_Var(const Var *) final
void rewrite_external(Def *) final
EtaRedPhase(World &world, flags_t annex)
RWPhase(World &world, std::string name, Analysis *analysis=nullptr)
Definition phase.h:115
World & world()=delete
Hides both and forbids direct access.
virtual const Def * rewrite(const Def *)
Definition rewrite.cpp:27
flags_t annex() const
Definition pass.h:68
The World represents the whole program and manages creation of MimIR nodes (Defs).
Definition world.h:31
Definition ast.h:14
u64 flags_t
Definition types.h:46
@ Var
Definition def.h:114