llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
#include <passes/pre_eval/symbolic_frame.h>
Classes | |
struct | object_iterator |
Iterator over objects. More... | |
Public Types | |
using | ObjectMap = std::map< unsigned, ID< SymbolicObject > > |
Mapping from indices to frame objects. | |
Public Member Functions | |
SymbolicFrame (SymbolicSummary &ctx, DAGFunc &func, unsigned index, llvm::ArrayRef< SymbolicValue > args, llvm::ArrayRef< ID< SymbolicObject >> objects) | |
Create a new frame. | |
SymbolicFrame (SymbolicSummary &ctx, unsigned index, llvm::ArrayRef< ID< SymbolicObject >> objects) | |
Create a new top-level frame. | |
Func * | GetFunc () |
Return the function. | |
const Func * | GetFunc () const |
Return the function. | |
ID< SymbolicFrame > | GetIndex () const |
Return the index. | |
void | Leave () |
De-activate the frame. | |
bool | IsValid () const |
Check if the frame is valid. | |
bool | Set (Ref< Inst > i, const SymbolicValue &value) |
const SymbolicValue & | Find (ConstRef< Inst > inst) |
Return the value an instruction was mapped to. | |
const SymbolicValue * | FindOpt (ConstRef< Inst > inst) |
Return the value, if it was already defined. | |
unsigned | GetNumArgs () const |
Returns the number of arguments. | |
const SymbolicValue & | Arg (unsigned index) |
Return the value of an argument. | |
ID< SymbolicObject > | GetObject (unsigned object) |
Return a specific object. | |
void | Merge (const SymbolicFrame &that) |
Merges another frame into this one. | |
bool | FindBypassed (std::set< DAGBlock * > &nodes, std::set< SymbolicContext * > &ctx, DAGBlock *start, DAGBlock *end) |
bool | FindBypassed (std::set< DAGBlock * > &nodes, std::set< SymbolicContext * > &ctx, Block *start, Block *end) |
Find bypasses for a node pair. | |
SymbolicContext * | GetBypass (DAGBlock *node) |
Return the bypassed context for the current node. | |
Block * | GetCurrentBlock () const |
Return the current node. | |
DAGBlock * | GetNode (Block *block) |
Return the node for a block. | |
bool | Limited (Block *block) |
Check whether the counter of a loop expired. | |
void | Continue (Block *node) |
Enter a node for execution. | |
void | Bypass (DAGBlock *node, const SymbolicContext &ctx) |
Bypass a node. | |
bool | IsBypassed (Block *node) |
Check whether the node was bypassed. | |
bool | IsBypassed (DAGBlock *node) |
Check whether the node was bypassed. | |
bool | IsExecuted (Block *block) |
Check whether the nodes was executed. | |
void | Approximate (Block *block) |
Mask a node as approximated. | |
DAGBlock * | Find (Block *block) |
Find the node which contains a block. | |
llvm::iterator_range< DAGFunc::node_iterator > | nodes () |
Iterator over the nodes of the function. | |
object_iterator | object_begin () |
Iterator over objects. | |
object_iterator | object_end () |
llvm::iterator_range< object_iterator > | objects () |
Symbolic representation of the execution frame of a function.
bool SymbolicFrame::FindBypassed | ( | std::set< DAGBlock * > & | nodes, |
std::set< SymbolicContext * > & | ctx, | ||
DAGBlock * | start, | ||
DAGBlock * | end | ||
) |
Find the set of nodes and their originating contexts which reach a join point after diverging on a bypassed path.
bool SymbolicFrame::Set | ( | Ref< Inst > | i, |
const SymbolicValue & | value | ||
) |
Map an instruction producing a single value to a new value.