LLVM 20.0.0git
|
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. | |
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. | |
LatticeVal | getValueState (LatticeKey Key) |
getValueState - Return the LatticeVal object corresponding to the given value from the ValueState map. | |
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. | |
bool | isBlockExecutable (BasicBlock *BB) const |
isBlockExecutable - Return true if there are any known feasible edges into the basic block. | |
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. | |
SparseSolver - This class is a general purpose solver for Sparse Conditional Propagation with a programmable lattice function.
Definition at line 113 of file SparsePropagation.h.
|
inlineexplicit |
Definition at line 138 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 152 of file SparsePropagation.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), 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 230 of file SparsePropagation.h.
References I.
|
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 173 of file SparsePropagation.h.
References llvm::SmallPtrSetImpl< PtrType >::count().
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 371 of file SparsePropagation.h.
References From, llvm::Instruction::getNumSuccessors(), and llvm::Instruction::getSuccessor().
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 260 of file SparsePropagation.h.
References llvm::dbgs(), llvm::Value::getName(), and LLVM_DEBUG.
Referenced by runCVP().
|
delete |
void llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::Print | ( | raw_ostream & | OS | ) | const |
Definition at line 502 of file SparsePropagation.h.
References OS.
void llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::Solve |
Solve - Solve for constants and executable blocks.
Definition at line 470 of file SparsePropagation.h.
References llvm::dbgs(), I, and LLVM_DEBUG.
Referenced by runCVP().