LLVM
15.0.0git
|
Helper class for SCCPSolver. More...
Friends | |
class | InstVisitor< SCCPInstVisitor > |
Helper class for SCCPSolver.
This implements the instruction visitor and holds all the state.
Definition at line 67 of file SCCPSolver.cpp.
|
inline |
Definition at line 350 of file SCCPSolver.cpp.
|
inline |
|
inline |
Definition at line 383 of file SCCPSolver.cpp.
References F, and llvm::SmallPtrSetImpl< PtrType >::insert().
|
inline |
Definition at line 375 of file SCCPSolver.cpp.
References F, and llvm::SmallPtrSetImpl< PtrType >::insert().
|
inline |
Definition at line 364 of file SCCPSolver.cpp.
References llvm::numbers::e, F, i, llvm::MapVector< KeyT, ValueT, MapType, VectorType >::insert(), and llvm::SmallPtrSetImpl< PtrType >::insert().
|
inline |
Definition at line 449 of file SCCPSolver.cpp.
Constant * SCCPInstVisitor::getConstant | ( | const ValueLatticeElement & | LV | ) | const |
Definition at line 516 of file SCCPSolver.cpp.
References llvm::ConstantInt::get(), llvm::ValueLatticeElement::getConstant(), llvm::ValueLatticeElement::getConstantRange(), llvm::ValueLatticeElement::isConstant(), and llvm::ValueLatticeElement::isConstantRange().
|
inline |
Definition at line 344 of file SCCPSolver.cpp.
References A, assert(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::end(), F, llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::find(), and llvm::DomTreeUpdater::Lazy.
|
inline |
Definition at line 415 of file SCCPSolver.cpp.
References assert(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::find(), llvm::Value::getType(), I, and llvm::Type::isStructTy().
|
inline |
Definition at line 433 of file SCCPSolver.cpp.
|
inline |
Definition at line 337 of file SCCPSolver.cpp.
References A, llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::find(), and I.
|
inline |
Definition at line 401 of file SCCPSolver.cpp.
References assert(), llvm::numbers::e, llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::find(), llvm::Value::getType(), i, and I.
|
inline |
Definition at line 429 of file SCCPSolver.cpp.
|
inline |
Definition at line 425 of file SCCPSolver.cpp.
|
inline |
Definition at line 387 of file SCCPSolver.cpp.
References llvm::SmallPtrSetImpl< PtrType >::count(), and F.
|
inline |
Definition at line 395 of file SCCPSolver.cpp.
References BB.
bool SCCPInstVisitor::isEdgeFeasible | ( | BasicBlock * | From, |
BasicBlock * | To | ||
) | const |
Definition at line 704 of file SCCPSolver.cpp.
References llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::count(), and From.
bool SCCPInstVisitor::isStructLatticeConstant | ( | Function * | F, |
StructType * | STy | ||
) |
Definition at line 505 of file SCCPSolver.cpp.
References assert(), llvm::numbers::e, F, llvm::StructType::getNumElements(), i, and isConstant().
void SCCPInstVisitor::markArgInFuncSpecialization | ( | Function * | F, |
const SmallVectorImpl< ArgInfo > & | Args | ||
) |
Definition at line 528 of file SCCPSolver.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), and F.
bool SCCPInstVisitor::markBlockExecutable | ( | BasicBlock * | BB | ) |
Definition at line 464 of file SCCPSolver.cpp.
References BB, llvm::dbgs(), and LLVM_DEBUG.
|
inline |
Definition at line 456 of file SCCPSolver.cpp.
|
inline |
Definition at line 437 of file SCCPSolver.cpp.
References llvm::numbers::e, llvm::Value::getType(), and i.
|
inline |
Definition at line 379 of file SCCPSolver.cpp.
References llvm::SmallPtrSetImpl< PtrType >::count(), and F.
|
inline |
bool SCCPInstVisitor::resolvedUndefsIn | ( | Function & | F | ) |
resolvedUndefsIn - 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.
This method handles this by finding an unresolved branch and marking it one of the edges from the block as being feasible, even though the condition doesn't say it would otherwise be. This allows SCCP to find the rest of the CFG and only slightly pessimizes the analysis results (by marking one, potentially infeasible, edge feasible). This cannot usefully modify the constraints on the condition of the branch, as that would impact other users of the value.
This scan also checks for values that use undefs. It conservatively marks them as overdefined.
Definition at line 1469 of file SCCPSolver.cpp.
References BB, llvm::numbers::e, F, llvm::BlockAddress::get(), llvm::CallBase::getCalledFunction(), llvm::ConstantInt::getFalse(), llvm::Instruction::getSuccessor(), i, I, llvm::ValueLatticeElement::isUnknownOrUndef(), and SI.
void SCCPInstVisitor::solve | ( | ) |
Definition at line 1402 of file SCCPSolver.cpp.
References BB, llvm::dbgs(), I, isOverdefined(), LLVM_DEBUG, and llvm::InstVisitor< SCCPInstVisitor >::visit().
|
inline |
Definition at line 355 of file SCCPSolver.cpp.
References llvm::GlobalVariable::getInitializer(), llvm::GlobalValue::getValueType(), llvm::Type::isSingleValueType(), and IV.
|
inline |
Definition at line 333 of file SCCPSolver.cpp.
References I.
|
friend |
Definition at line 277 of file SCCPSolver.cpp.