LLVM API Documentation
Public Member Functions | |
void | MarkBlockExecutable (BasicBlock *BB) |
void | TrackValueOfGlobalVariable (GlobalVariable *GV) |
void | AddTrackedFunction (Function *F) |
void | Solve () |
bool | ResolveBranchesIn (Function &F) |
std::set< BasicBlock * > & | getExecutableBlocks () |
hash_map< Value *, LatticeVal > & | getValueMapping () |
const hash_map< Function *, LatticeVal > & | getTrackedFunctionRetVals () |
const hash_map< GlobalVariable *, LatticeVal > & | getTrackedGlobals () |
Friends | |
class | InstVisitor< SCCPSolver > |
Definition at line 97 of file SCCP.cpp.
void SCCPSolver::MarkBlockExecutable | ( | BasicBlock * | BB | ) | [inline] |
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 136 of file SCCP.cpp.
References BB, DEBUG, and llvm::Value::getName().
void SCCPSolver::TrackValueOfGlobalVariable | ( | GlobalVariable * | GV | ) | [inline] |
TrackValueOfGlobalVariable - Clients can use this method to inform the SCCPSolver that it should track loads and stores to the specified global variable if it can. This is only legal to call if performing Interprocedural SCCP.
Definition at line 146 of file SCCP.cpp.
References llvm::SequentialType::getElementType(), llvm::GlobalValue::getType(), GV, and llvm::Type::isFirstClassType().
void SCCPSolver::AddTrackedFunction | ( | Function * | F | ) | [inline] |
void SCCPSolver::Solve | ( | ) |
Solve - Solve for constants and executable blocks.
Definition at line 968 of file SCCP.cpp.
References BB, DEBUG, llvm::Value::use_begin(), llvm::Value::use_end(), and llvm::InstVisitor< SubClass, RetTy >::visit().
bool SCCPSolver::ResolveBranchesIn | ( | Function & | F | ) |
ResolveBranchesIn - While solving the dataflow for a function, we assume that branches on undef values cannot reach any of their successors. However, this is not a safe assumption. After we solve dataflow, this method should be use to handle this. If this returns true, the solver should be rerun.
Definition at line 1029 of file SCCP.cpp.
References BB, F, llvm::Value::getType(), True, and llvm::InstVisitor< SubClass, RetTy >::visit().
std::set<BasicBlock*>& SCCPSolver::getExecutableBlocks | ( | ) | [inline] |
hash_map<Value*, LatticeVal>& SCCPSolver::getValueMapping | ( | ) | [inline] |
const hash_map<Function*, LatticeVal>& SCCPSolver::getTrackedFunctionRetVals | ( | ) | [inline] |
const hash_map<GlobalVariable*, LatticeVal>& SCCPSolver::getTrackedGlobals | ( | ) | [inline] |
friend class InstVisitor< SCCPSolver > [friend] |