LLVM
8.0.1
|
SparseSolver - This class is a general purpose solver for Sparse Conditional Propagation with a programmable lattice function. More...
#include "llvm/Analysis/SparsePropagation.h"
Public Member Functions | |
SparseSolver (AbstractLatticeFunction< LatticeKey, LatticeVal > *Lattice) | |
SparseSolver (const SparseSolver &)=delete | |
SparseSolver & | operator= (const SparseSolver &)=delete |
void | Solve () |
Solve - Solve for constants and executable blocks. More... | |
void | Print (raw_ostream &OS) const |
LatticeVal | getExistingValueState (LatticeKey Key) const |
getExistingValueState - Return the LatticeVal object corresponding to the given value from the ValueState map. More... | |
LatticeVal | getValueState (LatticeKey Key) |
getValueState - Return the LatticeVal object corresponding to the given value from the ValueState map. More... | |
bool | 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. More... | |
bool | isBlockExecutable (BasicBlock *BB) const |
isBlockExecutable - Return true if there are any known feasible edges into the basic block. More... | |
void | MarkBlockExecutable (BasicBlock *BB) |
MarkBlockExecutable - This method can be used by clients to mark all of the blocks that are known to be intrinsically live in the processed unit. More... | |
SparseSolver - This class is a general purpose solver for Sparse Conditional Propagation with a programmable lattice function.
Definition at line 35 of file SparsePropagation.h.
|
inlineexplicit |
Definition at line 137 of file SparsePropagation.h.
|
delete |
|
inline |
getExistingValueState - Return the LatticeVal object corresponding to the given value from the ValueState map.
If the value is not in the map, UntrackedVal is returned, unlike the getValueState method.
Definition at line 151 of file SparsePropagation.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), From, llvm::AbstractLatticeFunction< LatticeKey, LatticeVal >::getUntrackedVal(), and I.
Referenced by runCVP().
LatticeVal llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::getValueState | ( | LatticeKey | Key | ) |
getValueState - Return the LatticeVal object corresponding to the given value from the ValueState map.
If the value is not in the map, its state is initialized.
Definition at line 229 of file SparsePropagation.h.
|
inline |
isBlockExecutable - Return true if there are any known feasible edges into the basic block.
This is generally only useful when querying the lattice.
Definition at line 172 of file SparsePropagation.h.
References llvm::SmallPtrSetImpl< PtrType >::count(), I, and llvm::Sched::Source.
bool llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::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.
Definition at line 374 of file SparsePropagation.h.
References llvm::PHINode::getIncomingBlock(), llvm::PHINode::getIncomingValue(), llvm::PHINode::getNumIncomingValues(), llvm::Instruction::getNumSuccessors(), llvm::Instruction::getParent(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), I, llvm::Instruction::isTerminator(), and llvm::SmallVectorBase::size().
void llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::MarkBlockExecutable | ( | BasicBlock * | BB | ) |
MarkBlockExecutable - This method can be used by clients to mark all of the blocks that are known to be intrinsically live in the processed unit.
Definition at line 259 of file SparsePropagation.h.
References llvm::SmallVectorImpl< T >::assign(), llvm::BasicBlock::begin(), C, llvm::dbgs(), llvm::SwitchInst::findCaseValue(), llvm::SwitchInst::getCondition(), llvm::Value::getName(), llvm::Instruction::getNumSuccessors(), llvm::SwitchInst::CaseHandleImpl< SwitchInstT, ConstantIntT, BasicBlockT >::getSuccessorIndex(), llvm::Value::getType(), I, llvm::Instruction::isExceptionalTerminator(), llvm::Constant::isNullValue(), LLVM_DEBUG, llvm::SmallVectorImpl< T >::resize(), SI, llvm::SmallVectorBase::size(), and llvm::Sched::Source.
Referenced by runCVP().
|
delete |
void llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::Print | ( | raw_ostream & | OS | ) | const |
Definition at line 507 of file SparsePropagation.h.
void llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::Solve | ( | ) |
Solve - Solve for constants and executable blocks.
Definition at line 473 of file SparsePropagation.h.
References llvm::BasicBlock::back(), llvm::dbgs(), LLVM_DEBUG, and llvm::Value::users().
Referenced by runCVP().