llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
7 #include <unordered_map>
8 #include <unordered_set>
11 #include "core/adt/queue.h"
12 #include "passes/pta/graph.h"
13 #include "passes/pta/scc.h"
56 set->AddNode(
Set()->GetID());
94 std::unordered_map<Func *, ID<Func *>> funcToID_;
96 std::vector<Func *> idToFunc_;
98 std::unordered_map<Extern *, ID<Extern *>> extToID_;
100 std::vector<Extern *> idToExt_;
Node * Alloc(const std::vector< Inst * > &context)
Allocation site.
Definition: solver.h:53
void Subset(Node *from, Node *to)
Generates a subset constraint.
Definition: solver.cpp:69
~ConstraintSolver()
Cleans up after the solver.
Definition: solver.cpp:28
SetNode * Set()
Creates a set node.
Definition: solver.cpp:33
RootNode * Lookup(Global *global)
Returns the node attached to a global.
Node * Empty()
Constructs an empty node.
Definition: solver.cpp:168
ConstraintSolver()
Initialises the solver.
Definition: solver.cpp:22
DerefNode * Deref(SetNode *set)
Creates a deref node.
Definition: solver.cpp:40
RootNode * Root()
Constructs a root node.
Definition: solver.cpp:96
RootNode * Anchor(Node *node)
Creates a root from a node.
Definition: solver.cpp:147
void Store(Node *ptr, Node *val)
Creates a store constraint.
Definition: solver.h:47
Node * Load(Node *ptr)
Returns a load constraint.
Definition: solver.cpp:47
void Solve()
Solves the constraints until a fixpoint is reached.
Definition: solver.cpp:174
ID< Func * > Map(Func *func)
Maps a function to an ID.
Definition: solver.cpp:109