LLVM 22.0.0git
SCCP.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "sccp"

Functions

 STATISTIC (NumInstRemoved, "Number of instructions removed")
 STATISTIC (NumArgsElimed,"Number of arguments constant propagated")
 STATISTIC (NumGlobalConst, "Number of globals found to be constant")
 STATISTIC (NumDeadBlocks, "Number of basic blocks unreachable")
 STATISTIC (NumInstReplaced, "Number of instructions replaced with (simpler) instruction")
static void findReturnsToZap (Function &F, SmallVector< ReturnInst *, 8 > &ReturnsToZap, SCCPSolver &Solver)
static bool runIPSCCP (Module &M, const DataLayout &DL, FunctionAnalysisManager *FAM, std::function< const TargetLibraryInfo &(Function &)> GetTLI, std::function< TargetTransformInfo &(Function &)> GetTTI, std::function< AssumptionCache &(Function &)> GetAC, std::function< DominatorTree &(Function &)> GetDT, std::function< BlockFrequencyInfo &(Function &)> GetBFI, bool IsFuncSpecEnabled)

Variables

static cl::opt< unsignedFuncSpecMaxIters ("funcspec-max-iters", cl::init(10), cl::Hidden, cl::desc("The maximum number of iterations function specialization is run"))

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "sccp"

Definition at line 37 of file SCCP.cpp.

Function Documentation

◆ findReturnsToZap()

◆ runIPSCCP()

Definition at line 108 of file SCCP.cpp.

References A(), llvm::SCCPSolver::addArgumentTrackedFunction(), llvm::SCCPSolver::addPredicateInfo(), llvm::SCCPSolver::addTrackedFunction(), llvm::all_of(), llvm::ArgMem, llvm::CallBase::args(), assert(), llvm::canTrackArgumentsInterprocedurally(), llvm::canTrackGlobalVariableInterprocedurally(), llvm::canTrackReturnsInterprocedurally(), llvm::cast(), llvm::changeToUnreachable(), llvm::dbgs(), DL, llvm::dyn_cast(), llvm::ErrnoMem, F, FAM, findReturnsToZap(), FuncSpecMaxIters, G, llvm::PoisonValue::get(), llvm::CallBase::getArgOperandNo(), llvm::GlobalVariable::getDebugInfo(), llvm::getExpressionForConstant(), llvm::GlobalVariable::getInitializer(), llvm::MemoryEffectsBase< LocationEnum >::getModRef(), llvm::SCCPSolver::getMRVFunctionsTracked(), llvm::Value::getName(), llvm::SCCPSolver::getTrackedGlobals(), llvm::SCCPSolver::getTrackedRetVals(), llvm::GlobalValue::getValueType(), llvm::Attribute::getWithMemoryEffects(), I, llvm::SCCPSolver::inferArgAttributes(), llvm::SCCPSolver::inferReturnAttributes(), llvm::SetVector< T, Vector, Set, N >::insert(), llvm::isa(), llvm::SCCPSolver::isBlockExecutable(), llvm::SCCPSolver::isConstant(), llvm::FunctionSpecializer::isDeadFunction(), llvm::SCCPSolver::isOverdefined(), llvm::SCCPSolver::isStructLatticeConstant(), LLVM_DEBUG, llvm::make_early_inc_range(), llvm::SCCPSolver::markBlockExecutable(), llvm::Other, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SCCPSolver::removeNonFeasibleEdges(), llvm::CallBase::removeParamAttr(), llvm::CallBase::removeRetAttrs(), llvm::SCCPSolver::removeSSACopies(), llvm::FunctionSpecializer::run(), llvm::SCCPSolver::simplifyInstsInBlock(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::SCCPSolver::solveWhileResolvedUndefsIn(), llvm::SCCPSolver::trackValueOfArgument(), llvm::SCCPSolver::trackValueOfGlobalVariable(), llvm::SCCPSolver::tryToReplaceWithConstant(), llvm::MemoryEffectsBase< IRMemLocation >::unknown(), and llvm::Value::users().

Referenced by llvm::IPSCCPPass::run().

◆ STATISTIC() [1/5]

STATISTIC ( NumArgsElimed ,
"Number of arguments constant propagated"  )

◆ STATISTIC() [2/5]

STATISTIC ( NumDeadBlocks ,
"Number of basic blocks unreachable"  )

◆ STATISTIC() [3/5]

STATISTIC ( NumGlobalConst ,
"Number of globals found to be constant"  )

◆ STATISTIC() [4/5]

STATISTIC ( NumInstRemoved ,
"Number of instructions removed"  )

◆ STATISTIC() [5/5]

STATISTIC ( NumInstReplaced ,
"Number of instructions replaced with (simpler) instruction"  )

Variable Documentation

◆ FuncSpecMaxIters

cl::opt< unsigned > FuncSpecMaxIters("funcspec-max-iters", cl::init(10), cl::Hidden, cl::desc( "The maximum number of iterations function specialization is run")) ( "funcspec-max-iters" ,
cl::init(10) ,
cl::Hidden ,
cl::desc( "The maximum number of iterations function specialization is run")  )
static

Referenced by runIPSCCP().