llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
9 #include "core/adt/bitset.h"
10 #include "core/analysis/reference_graph.h"
13 #include "core/type.h"
17 class MemoryStoreInst;
22 using ObjectOffsetMap = std::unordered_map<ID<Object>, OffsetSet>;
35 std::unique_ptr<DAGFunc>
DAG;
61 , std::map<uint64_t, std::pair<Type, Ref<Inst>>>
70 return Overwrite(imprecise);
75 void dump(llvm::raw_ostream &os);
85 llvm::DenseSet<ReverseNodeState *>
Succs;
90 , std::map<uint64_t, std::pair<MemoryStoreInst *, uint64_t>>
109 MemoryStoreInst *store =
nullptr
119 void dump(llvm::raw_ostream &os);
bool Indirect
Flag to indicate whether any function has indirect calls.
Definition: nodes.h:47
BitSet< Object > Loaded
Set of inaccurate loads.
Definition: nodes.h:96
void dump(llvm::raw_ostream &os)
Print information about the node to a stream.
Definition: nodes.cpp:247
BitSet< Func > Funcs
IDs of referenced functions.
Definition: nodes.h:53
BitSet< Func > Funcs
Set of referenced functions.
Definition: nodes.h:37
DAGBlock & Node
Originating nodes.
Definition: nodes.h:83
void Store(ID< Object > id)
Definition: nodes.cpp:172
BitSet< Object > Stored
Set of changed objects.
Definition: nodes.h:41
BitSet< Func > Funcs
Set of referenced functions.
Definition: nodes.h:27
llvm::DenseSet< ReverseNodeState * > Succs
Predecessor of the node.
Definition: nodes.h:85
std::unordered_map< ID< Object >, std::map< uint64_t, std::pair< MemoryStoreInst *, uint64_t > > > Stores
Set of stores which can be forwarded here.
Definition: nodes.h:91
BitSet< Object > Loaded
Set of dereferenced objects.
Definition: nodes.h:43
void Load(ID< Object > id)
Definition: nodes.cpp:216
Transitive closure of a function.
Definition: nodes.h:33
std::unordered_map< ID< Object >, std::map< uint64_t, std::pair< Type, Ref< Inst > > > > Stores
Accurate stores.
Definition: nodes.h:62
BitSet< Object > Escaped
Set of escaped objects.
Definition: nodes.h:39
void Merge(const ReverseNodeState &that)
LUB operator of two nodes.
Definition: nodes.cpp:103
std::unique_ptr< DAGFunc > DAG
DAG-based representation of the function.
Definition: nodes.h:35
Transitive closure of an object.
Definition: nodes.h:25
bool Insert(const ID< T > &item)
Inserts an item into the bitset.
Definition: bitset.h:391
BitSet< Object > Stored
Set of objects changed to unknown values.
Definition: nodes.h:57
bool Raises
Flag to indicate whether any function raises.
Definition: nodes.h:45
BitSet< Object > Stored
Imprecise, tainted locations.
Definition: nodes.h:93
BitSet< Object > Objects
Set of referenced objects.
Definition: nodes.h:29
Evaluation state of a node.
Definition: nodes.h:51
BitSet< Object > Escaped
ID of tainted objects.
Definition: nodes.h:55