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/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, "eta reduction") {}
12
13private:
14 void rewrite_external(Def*) final;
15 const Def* rewrite_no_eta(const Def* def) { return Rewriter::rewrite(def); }
16 const Def* rewrite(const Def*);
17 const Def* rewrite_imm_Var(const Var*) final;
18};
19
20} // 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
RWPhase(World &world, std::string name)
Definition phase.h:73
World & world()=delete
Hides both and forbids direct access.
virtual const Def * rewrite(const Def *)
Definition rewrite.cpp:14
The World represents the whole program and manages creation of MimIR nodes (Defs).
Definition world.h:36
Definition ast.h:14
@ Var
Definition def.h:114