llir-opt  0.0.1
Low-Level Post-Link Optimiser for OCaml and C
Classes | Public Types | Public Member Functions | List of all members
SymbolicFrame Class Reference

#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.
 
FuncGetFunc ()
 Return the function.
 
const FuncGetFunc () const
 Return the function.
 
ID< SymbolicFrameGetIndex () 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 SymbolicValueFind (ConstRef< Inst > inst)
 Return the value an instruction was mapped to.
 
const SymbolicValueFindOpt (ConstRef< Inst > inst)
 Return the value, if it was already defined.
 
unsigned GetNumArgs () const
 Returns the number of arguments.
 
const SymbolicValueArg (unsigned index)
 Return the value of an argument.
 
ID< SymbolicObjectGetObject (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.
 
SymbolicContextGetBypass (DAGBlock *node)
 Return the bypassed context for the current node.
 
BlockGetCurrentBlock () const
 Return the current node.
 
DAGBlockGetNode (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.
 
DAGBlockFind (Block *block)
 Find the node which contains a block.
 
llvm::iterator_range< DAGFunc::node_iteratornodes ()
 Iterator over the nodes of the function.
 
object_iterator object_begin ()
 Iterator over objects.
 
object_iterator object_end ()
 
llvm::iterator_range< object_iteratorobjects ()
 

Detailed Description

Symbolic representation of the execution frame of a function.

Member Function Documentation

◆ FindBypassed()

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.

◆ Set()

bool SymbolicFrame::Set ( Ref< Inst i,
const SymbolicValue value 
)

Map an instruction producing a single value to a new value.

Returns
True if the value changed.

The documentation for this class was generated from the following files: