LLVM API Documentation

llvm::SparseSolver Class Reference

#include <SparsePropagation.h>

Collaboration diagram for llvm::SparseSolver:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SparseSolver (AbstractLatticeFunction *Lattice)
 ~SparseSolver ()
void Solve (Function &F)
void Print (Function &F, std::ostream &OS)
LatticeVal getLatticeState (Value *V) const
LatticeVal getOrInitValueState (Value *V)
bool isEdgeFeasible (BasicBlock *From, BasicBlock *To, bool AggressiveUndef=false)


Detailed Description

SparseSolver - This class is a general purpose solver for Sparse Conditional Propagation with a programmable lattice function.

Definition at line 109 of file SparsePropagation.h.


Constructor & Destructor Documentation

llvm::SparseSolver::SparseSolver ( AbstractLatticeFunction Lattice  )  [inline, explicit]

Definition at line 131 of file SparsePropagation.h.

llvm::SparseSolver::~SparseSolver (  )  [inline]

Definition at line 133 of file SparsePropagation.h.


Member Function Documentation

void SparseSolver::Solve ( Function F  ) 

Solve - Solve for constants and executable blocks.

Definition at line 276 of file SparsePropagation.cpp.

References DOUT, E, llvm::Function::getEntryBlock(), and llvm::Instruction::getParent().

void SparseSolver::Print ( Function F,
std::ostream &  OS 
)

LatticeVal llvm::SparseSolver::getLatticeState ( Value V  )  const [inline]

getLatticeState - Return the LatticeVal object that corresponds to the value. If an value is not in the map, it is returned as untracked, unlike the getOrInitValueState method.

Definition at line 146 of file SparsePropagation.h.

References llvm::AbstractLatticeFunction::getUntrackedVal(), and I.

Referenced by Print().

SparseSolver::LatticeVal SparseSolver::getOrInitValueState ( Value V  ) 

getOrInitValueState - Return the LatticeVal object that corresponds to the value, initializing the value's state if it hasn't been entered into the map yet. This function is necessary because not all values should start out in the underdefined state... Arguments should be overdefined, and constants should be marked as constants.

getOrInitValueState - Return the LatticeVal object that corresponds to the value, initializing the value's state if it hasn't been entered into the map yet. This function is necessary because not all values should start out in the underdefined state... Arguments should be overdefined, and constants should be marked as constants.

Definition at line 51 of file SparsePropagation.cpp.

References A, llvm::CallingConv::C, llvm::AbstractLatticeFunction::ComputeArgument(), llvm::AbstractLatticeFunction::ComputeConstant(), llvm::AbstractLatticeFunction::getOverdefinedVal(), llvm::AbstractLatticeFunction::getUndefVal(), llvm::AbstractLatticeFunction::getUntrackedVal(), I, if(), llvm::AbstractLatticeFunction::IsUntrackedValue(), and LV.

bool SparseSolver::isEdgeFeasible ( BasicBlock From,
BasicBlock To,
bool  AggressiveUndef = false 
)

isEdgeFeasible - Return true if the control flow edge from the 'From' basic block to the 'To' basic block is currently feasible. If AggressiveUndef is true, then this treats values with unknown lattice values as undefined. This is generally only useful when solving the lattice, not when querying it.

isEdgeFeasible - Return true if the control flow edge from the 'From' basic block to the 'To' basic block is currently feasible...

Definition at line 198 of file SparsePropagation.cpp.

References llvm::TerminatorInst::getNumSuccessors(), llvm::TerminatorInst::getSuccessor(), and llvm::BasicBlock::getTerminator().


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



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.