llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
9 #include "core/adt/bitset.h"
10 #include "core/adt/hash.h"
11 #include "core/adt/union_find.h"
39 < std::forward_iterator_tag
50 bool operator==(
const node_iterator &that)
const {
return it_ == that.it_; }
51 bool operator!=(
const node_iterator &that)
const {
return !(*
this == that); }
66 Node *operator*()
const {
return graph_.nodes_.Map(*it_); }
67 Node *operator->()
const {
return operator*(); }
77 node_iterator nodes_begin() {
return node_iterator(graph_, nodes_.begin()); }
78 node_iterator nodes_end() {
return node_iterator(graph_, nodes_.end()); }
83 nodes_.Union(that.nodes_);
84 self_.
Union(that.self_);
85 refs_.
Union(that.refs_);
86 stacks_.
Union(that.stacks_);
87 funcs_.
Union(that.funcs_);
142 std::shared_ptr<SymbolicPointer>
BuildTaint();
151 llvm::iterator_range<func_iterator> funcs()
const
153 return llvm::make_range(func_begin(), func_end());
177 std::unordered_map<ID<SymbolicObject>,
ID<Node>> objectToNode_;
180 std::set<SymbolicObject *> objects_;
void AddEscaped(Object *g)
Add the pointer itself to the closure.
Definition: pointer_closure.cpp:122
Iterator over the bitset items.
Definition: bitset.h:199
Definition: symbolic_context.h:28
Definition: symbolic_pointer.h:270
void AddRead(Object *g)
Add contained objects to the closure.
Definition: pointer_closure.cpp:104
size_t Size() const
Returns the size of the document.
Definition: bitset.h:516
std::shared_ptr< SymbolicPointer > BuildTaint()
Definition: pointer_closure.cpp:150
Definition: symbolic_value.h:24
Definition: pointer_closure.h:33
iterator begin() const
Start iterator.
Definition: bitset.h:356
Node * GetRoot()
Return the root node.
Definition: pointer_closure.h:145
Definition: symbolic_object.h:26
iterator end() const
End iterator.
Definition: bitset.h:362
size_t func_size() const
Iterator over functions.
Definition: pointer_closure.h:148
void Add(const SymbolicValue &value)
Definition: pointer_closure.cpp:48
PointerClosure(SymbolicHeap &heap, SymbolicContext &ctx)
Definition: pointer_closure.cpp:34
void AddWritten(Object *g)
Add contained objects to the set of overwritten ones.
Definition: pointer_closure.cpp:113
Definition: pointer_closure.h:28
Definition: symbolic_frame.h:29
BitSet< Func >::iterator func_iterator
Iterator over functions.
Definition: pointer_closure.h:109
std::shared_ptr< SymbolicPointer > BuildTainted()
Definition: pointer_closure.cpp:139
Definition: pointer_closure.h:38
unsigned Union(const BitSet &that)
Definition: bitset.h:434
Definition: union_find.h:18
void Union(const Node &that)
Merge another node into this one.
Definition: pointer_closure.h:81
Definition: symbolic_heap.h:21