llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
7 #include <unordered_map>
9 #include "core/adt/id.h"
84 template <
typename... Args>
85 Origin(Args... args) : v_(std::forward<Args>(args)...) {}
96 U(
unsigned fr,
unsigned idx) {
new (&F)
FrameOrigin(fr, idx); }
97 U(
unsigned fr, CallSite *alloc) {
new (&A)
AllocOrigin(fr, alloc); }
124 std::unordered_map<Object *, ID<SymbolicObject>> objects_;
130 std::vector<Origin> origins_;
132 std::unordered_map<Func *, ID<Func>> funcToIDs_;
134 std::vector<Func *> idToFunc_;
FrameOrigin & AsFrame()
Return the frame origin.
Definition: symbolic_heap.h:79
DataOrigin & AsData()
Return the data origin.
Definition: symbolic_heap.h:77
ID< SymbolicObject > Alloc(unsigned frame, CallSite *site)
Record an ID for an allocation.
Definition: symbolic_heap.cpp:34
ID of the object kind.
Definition: symbolic_heap.h:89
Definition: symbolic_object.h:26
AllocOrigin & AsAlloc()
Return the alloc origin.
Definition: symbolic_heap.h:81
Origin & Map(ID< SymbolicObject > id)
Returns the origin of an object.
Definition: symbolic_heap.h:116
ID< SymbolicObject > Data(Object *object)
Record an ID for an object.
Definition: symbolic_heap.cpp:12
Kind
Enumeration of object kinds.
Definition: symbolic_heap.h:27
ID< SymbolicObject > Frame(unsigned frame, unsigned object)
Record an ID for a frame.
Definition: symbolic_heap.cpp:23
Frame object.
Definition: symbolic_heap.h:46
Heap object.
Definition: symbolic_heap.h:60
Data object.
Definition: symbolic_heap.h:34
SymbolicHeap()
Initialise the mapping.
Definition: symbolic_heap.h:104
Kind GetKind() const
Return the kind of the object.
Definition: symbolic_heap.h:74
ID< Func > Function(Func *f)
Record an ID for a function.
Definition: symbolic_heap.cpp:45
Class to describe the origin of an object.
Definition: symbolic_heap.h:24
Definition: symbolic_heap.h:21