Go to the source code of this file.
|
| STATISTIC (TotalConsidered, "Number of guards considered") |
| STATISTIC (TotalWidened, "Number of checks widened") |
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)) |
◆ 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 1003 of file LoopPredication.cpp.
References assert(), llvm::DominatorTree::dominates(), llvm::ScalarEvolution::getCouldNotCompute(), llvm::ScalarEvolution::getExitCount(), llvm::ScalarEvolution::getUMinFromMismatchedTypes(), llvm::isa(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
◆ isSafeToTruncateWideIVType()
◆ normalizePredicate()
◆ STATISTIC() [1/2]
STATISTIC |
( |
TotalConsidered | , |
|
|
"Number of guards considered" | ) |
◆ STATISTIC() [2/2]
STATISTIC |
( |
TotalWidened | , |
|
|
"Number of checks widened" | ) |
◆ EnableCountDownLoop
cl::opt< bool > EnableCountDownLoop("loop-predication-enable-count-down-loop", cl::Hidden, cl::init(true)) |
( |
"loop-predication-enable-count-down-loop" | , |
|
|
cl::Hidden | , |
|
|
cl::init(true) | ) |
|
static |
◆ EnableIVTruncation
cl::opt< bool > EnableIVTruncation("loop-predication-enable-iv-truncation", cl::Hidden, cl::init(true)) |
( |
"loop-predication-enable-iv-truncation" | , |
|
|
cl::Hidden | , |
|
|
cl::init(true) | ) |
|
static |
◆ 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
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)) |
( |
"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 |
◆ SkipProfitabilityChecks
cl::opt< bool > SkipProfitabilityChecks("loop-predication-skip-profitability-checks", cl::Hidden, cl::init(false)) |
( |
"loop-predication-skip-profitability-checks" | , |
|
|
cl::Hidden | , |
|
|
cl::init(false) | ) |
|
static |