LLVM API Documentation
#include <SparsePropagation.h>
Public Types | |
typedef void * | LatticeVal |
Public Member Functions | |
AbstractLatticeFunction (LatticeVal undefVal, LatticeVal overdefinedVal, LatticeVal untrackedVal) | |
virtual | ~AbstractLatticeFunction () |
LatticeVal | getUndefVal () const |
LatticeVal | getOverdefinedVal () const |
LatticeVal | getUntrackedVal () const |
virtual bool | IsUntrackedValue (Value *V) |
virtual LatticeVal | ComputeConstant (Constant *C) |
virtual bool | IsSpecialCasedPHI (PHINode *PN) |
virtual Constant * | GetConstant (LatticeVal LV, Value *Val, SparseSolver &SS) |
virtual LatticeVal | ComputeArgument (Argument *I) |
virtual LatticeVal | MergeValues (LatticeVal X, LatticeVal Y) |
virtual LatticeVal | ComputeInstructionState (Instruction &I, SparseSolver &SS) |
virtual void | PrintValue (LatticeVal V, raw_ostream &OS) |
PrintValue - Render the specified lattice value to the specified stream. |
AbstractLatticeFunction - This class is implemented by the dataflow instance to specify what the lattice values are and how they handle merges etc. This gives the client the power to compute lattice values from instructions, constants, etc. The requirement is that lattice values must all fit into a void*. If a void* is not sufficient, the implementation should use this pointer to be a pointer into a uniquing set or something.
Definition at line 44 of file SparsePropagation.h.
typedef void* llvm::AbstractLatticeFunction::LatticeVal |
Definition at line 46 of file SparsePropagation.h.
llvm::AbstractLatticeFunction::AbstractLatticeFunction | ( | LatticeVal | undefVal, |
LatticeVal | overdefinedVal, | ||
LatticeVal | untrackedVal | ||
) | [inline] |
Definition at line 50 of file SparsePropagation.h.
AbstractLatticeFunction::~AbstractLatticeFunction | ( | ) | [virtual] |
Definition at line 29 of file SparsePropagation.cpp.
virtual LatticeVal llvm::AbstractLatticeFunction::ComputeArgument | ( | Argument * | I | ) | [inline, virtual] |
ComputeArgument - Given a formal argument value, compute and return a lattice value corresponding to the specified argument.
Definition at line 90 of file SparsePropagation.h.
References getOverdefinedVal().
Referenced by llvm::SparseSolver::getOrInitValueState().
virtual LatticeVal llvm::AbstractLatticeFunction::ComputeConstant | ( | Constant * | C | ) | [inline, virtual] |
ComputeConstant - Given a constant value, compute and return a lattice value corresponding to the specified constant.
Definition at line 71 of file SparsePropagation.h.
References getOverdefinedVal().
Referenced by llvm::SparseSolver::getOrInitValueState().
virtual LatticeVal llvm::AbstractLatticeFunction::ComputeInstructionState | ( | Instruction & | I, |
SparseSolver & | SS | ||
) | [inline, virtual] |
ComputeInstructionState - Given an instruction and a vector of its operand values, compute the result value of the instruction.
Definition at line 103 of file SparsePropagation.h.
References getOverdefinedVal().
virtual Constant* llvm::AbstractLatticeFunction::GetConstant | ( | LatticeVal | LV, |
Value * | Val, | ||
SparseSolver & | SS | ||
) | [inline, virtual] |
GetConstant - If the specified lattice value is representable as an LLVM constant value, return it. Otherwise return null. The returned value must be in the same LLVM type as Val.
Definition at line 84 of file SparsePropagation.h.
LatticeVal llvm::AbstractLatticeFunction::getOverdefinedVal | ( | ) | const [inline] |
Definition at line 59 of file SparsePropagation.h.
Referenced by ComputeArgument(), ComputeConstant(), ComputeInstructionState(), llvm::SparseSolver::getOrInitValueState(), and MergeValues().
LatticeVal llvm::AbstractLatticeFunction::getUndefVal | ( | ) | const [inline] |
Definition at line 58 of file SparsePropagation.h.
Referenced by llvm::SparseSolver::getOrInitValueState().
LatticeVal llvm::AbstractLatticeFunction::getUntrackedVal | ( | ) | const [inline] |
Definition at line 60 of file SparsePropagation.h.
Referenced by llvm::SparseSolver::getLatticeState(), and llvm::SparseSolver::getOrInitValueState().
virtual bool llvm::AbstractLatticeFunction::IsSpecialCasedPHI | ( | PHINode * | PN | ) | [inline, virtual] |
IsSpecialCasedPHI - Given a PHI node, determine whether this PHI node is one that the we want to handle through ComputeInstructionState.
Definition at line 77 of file SparsePropagation.h.
virtual bool llvm::AbstractLatticeFunction::IsUntrackedValue | ( | Value * | V | ) | [inline, virtual] |
IsUntrackedValue - If the specified Value is something that is obviously uninteresting to the analysis (and would always return UntrackedVal), this function can return true to avoid pointless work.
Definition at line 65 of file SparsePropagation.h.
Referenced by llvm::SparseSolver::getOrInitValueState().
virtual LatticeVal llvm::AbstractLatticeFunction::MergeValues | ( | LatticeVal | X, |
LatticeVal | Y | ||
) | [inline, virtual] |
MergeValues - Compute and return the merge of the two specified lattice values. Merging should only move one direction down the lattice to guarantee convergence (toward overdefined).
Definition at line 97 of file SparsePropagation.h.
References getOverdefinedVal().
void AbstractLatticeFunction::PrintValue | ( | LatticeVal | V, |
raw_ostream & | OS | ||
) | [virtual] |
PrintValue - Render the specified lattice value to the specified stream.
Definition at line 32 of file SparsePropagation.cpp.
Referenced by llvm::SparseSolver::Print().