MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
beta_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 BetaRedPhase : public FPPhase {
9public:
11
12private:
13 void reset() final;
14 bool analyze() final;
15 void analyze(const Def*);
16 void visit(Lam*);
17
18 const Def* rewrite_imm_App(const App*) final;
19 bool is_candidate(Lam*) const;
20
21 DefSet analyzed_;
22 LamMap<bool> candidates_;
23};
24
25} // namespace mim
const Def * rewrite_imm_App(const App *) final
Base class for all Defs.
Definition def.h:251
FPPhase(World &world, std::string name)
Definition phase.h:121
A function.
Definition lam.h:109
The World represents the whole program and manages creation of MimIR nodes (Defs).
Definition world.h:36
Definition ast.h:14
GIDMap< Lam *, To > LamMap
Definition lam.h:216
GIDSet< const Def * > DefSet
Definition def.h:74