llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
#include <passes/pre_eval/pointer_closure.h>
Classes | |
class | Node |
Public Types | |
using | func_iterator = BitSet< Func >::iterator |
Iterator over functions. | |
Public Member Functions | |
PointerClosure (SymbolicHeap &heap, SymbolicContext &ctx) | |
void | Add (const SymbolicValue &value) |
void | AddRead (Object *g) |
Add contained objects to the closure. | |
void | AddWritten (Object *g) |
Add contained objects to the set of overwritten ones. | |
void | AddEscaped (Object *g) |
Add the pointer itself to the closure. | |
void | Add (Func *f) |
Add a function to the set. | |
std::shared_ptr< SymbolicPointer > | BuildTainted () |
std::shared_ptr< SymbolicPointer > | BuildTaint () |
Node * | GetRoot () |
Return the root node. | |
size_t | func_size () const |
Iterator over functions. | |
func_iterator | func_begin () const |
func_iterator | func_end () const |
llvm::iterator_range< func_iterator > | funcs () const |
Helper to compute the transitive closures of objects on the heap.
PointerClosure::PointerClosure | ( | SymbolicHeap & | heap, |
SymbolicContext & | ctx | ||
) |
Build a graph of the SCCs of heap nodes.
void PointerClosure::Add | ( | const SymbolicValue & | value | ) |
Transitively extract information pointed to by value.
Update value with the newly extracted nodes.
std::shared_ptr< SymbolicPointer > PointerClosure::BuildTaint | ( | ) |
Build a pointer containing all dereferenced pointers.
std::shared_ptr< SymbolicPointer > PointerClosure::BuildTainted | ( | ) |
Build a pointer containing all the overwritten pointers.