Go to the source code of this file.
|
| STATISTIC (TotalConsidered, "Number of guards considered") |
|
| STATISTIC (TotalWidened, "Number of checks widened") |
|
| INITIALIZE_PASS_BEGIN (LoopPredicationLegacyPass, "loop-predication", "Loop predication", false, false) INITIALIZE_PASS_END(LoopPredicationLegacyPass |
|
static bool | isSafeToTruncateWideIVType (const DataLayout &DL, ScalarEvolution &SE, const LoopICmp LatchCheck, Type *RangeCheckType) |
|
static std::optional< LoopICmp > | generateLoopLatchCheck (const DataLayout &DL, ScalarEvolution &SE, const LoopICmp LatchCheck, Type *RangeCheckType) |
|
static void | normalizePredicate (ScalarEvolution *SE, Loop *L, LoopICmp &RC) |
|
static BranchInst * | FindWidenableTerminatorAboveLoop (Loop *L, LoopInfo &LI) |
| If we can (cheaply) find a widenable branch which controls entry into the loop, return it.
|
|
static const SCEV * | getMinAnalyzeableBackedgeTakenCount (ScalarEvolution &SE, DominatorTree &DT, Loop *L) |
| Return the minimum of all analyzeable exit counts.
|
|
|
static cl::opt< bool > | EnableIVTruncation ("loop-predication-enable-iv-truncation", cl::Hidden, cl::init(true)) |
|
static cl::opt< bool > | EnableCountDownLoop ("loop-predication-enable-count-down-loop", cl::Hidden, cl::init(true)) |
|
static cl::opt< bool > | SkipProfitabilityChecks ("loop-predication-skip-profitability-checks", cl::Hidden, cl::init(false)) |
|
static cl::opt< float > | LatchExitProbabilityScale ("loop-predication-latch-probability-scale", cl::Hidden, cl::init(2.0), cl::desc("scale factor for the latch probability. Value should be greater " "than 1. Lower values are ignored")) |
|
static cl::opt< bool > | PredicateWidenableBranchGuards ("loop-predication-predicate-widenable-branches-to-deopt", cl::Hidden, cl::desc("Whether or not we should predicate guards " "expressed as widenable branches to deoptimize blocks"), cl::init(true)) |
|
static cl::opt< bool > | InsertAssumesOfPredicatedGuardsConditions ("loop-predication-insert-assumes-of-predicated-guards-conditions", cl::Hidden, cl::desc("Whether or not we should insert assumes of conditions of " "predicated guards"), cl::init(true)) |
|
loop | predication |
|
loop Loop | false |
|
◆ DEBUG_TYPE
#define DEBUG_TYPE "loop-predication" |
◆ FindWidenableTerminatorAboveLoop()
◆ generateLoopLatchCheck()
◆ getMinAnalyzeableBackedgeTakenCount()
Return the minimum of all analyzeable exit counts.
This is an upper bound on the actual exit count. If there are not at least two analyzeable exits, returns SCEVCouldNotCompute.
Definition at line 1073 of file LoopPredication.cpp.
References assert(), llvm::DominatorTree::dominates(), llvm::ScalarEvolution::getCouldNotCompute(), llvm::ScalarEvolution::getExitCount(), llvm::LoopBase< BlockT, LoopT >::getExitingBlocks(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), llvm::ScalarEvolution::getUMinFromMismatchedTypes(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::SmallVectorBase< Size_T >::size().
◆ INITIALIZE_PASS_BEGIN()
INITIALIZE_PASS_BEGIN |
( |
LoopPredicationLegacyPass |
, |
|
|
"loop-predication" |
, |
|
|
"Loop predication" |
, |
|
|
false |
, |
|
|
false |
|
|
) |
| |
◆ isSafeToTruncateWideIVType()
◆ normalizePredicate()
◆ STATISTIC() [1/2]
STATISTIC |
( |
TotalConsidered |
, |
|
|
"Number of guards considered" |
|
|
) |
| |
◆ STATISTIC() [2/2]
STATISTIC |
( |
TotalWidened |
, |
|
|
"Number of checks widened" |
|
|
) |
| |
◆ EnableCountDownLoop
◆ EnableIVTruncation
◆ false
◆ InsertAssumesOfPredicatedGuardsConditions
cl::opt< bool > InsertAssumesOfPredicatedGuardsConditions("loop-predication-insert-assumes-of-predicated-guards-conditions", cl::Hidden, cl::desc("Whether or not we should insert assumes of conditions of " "predicated guards"), cl::init(true)) |
( |
"loop-predication-insert-assumes-of-predicated-guards-conditions" |
, |
|
|
cl::Hidden |
, |
|
|
cl::desc("Whether or not we should insert assumes of conditions of " "predicated guards") |
, |
|
|
cl::init(true) |
|
|
) |
| |
|
static |
◆ LatchExitProbabilityScale
cl::opt< float > LatchExitProbabilityScale("loop-predication-latch-probability-scale", cl::Hidden, cl::init(2.0), cl::desc("scale factor for the latch probability. Value should be greater " "than 1. Lower values are ignored")) |
( |
"loop-predication-latch-probability-scale" |
, |
|
|
cl::Hidden |
, |
|
|
cl::init(2.0) |
, |
|
|
cl::desc("scale factor for the latch probability. Value should be greater " "than 1. Lower values are ignored") |
|
|
) |
| |
|
static |
◆ PredicateWidenableBranchGuards
◆ predication
◆ SkipProfitabilityChecks