LLVM 18.0.0git
|
Information about the number of loop iterations for which a loop exit's branch condition evaluates to the not-taken path. More...
#include "llvm/Analysis/ScalarEvolution.h"
Public Member Functions | |
void | addPredicate (const SCEVPredicate *P) |
ExitLimit (const SCEV *E) | |
Construct either an exact exit limit from a constant, or an unknown one from a SCEVCouldNotCompute. | |
ExitLimit (const SCEV *E, const SCEV *ConstantMaxNotTaken, const SCEV *SymbolicMaxNotTaken, bool MaxOrZero, ArrayRef< const SmallPtrSetImpl< const SCEVPredicate * > * > PredSetList=std::nullopt) | |
ExitLimit (const SCEV *E, const SCEV *ConstantMaxNotTaken, const SCEV *SymbolicMaxNotTaken, bool MaxOrZero, const SmallPtrSetImpl< const SCEVPredicate * > &PredSet) | |
bool | hasAnyInfo () const |
Test whether this ExitLimit contains any computed information, or whether it's all SCEVCouldNotCompute values. | |
bool | hasFullInfo () const |
Test whether this ExitLimit contains all information. | |
Public Attributes | |
const SCEV * | ExactNotTaken |
const SCEV * | ConstantMaxNotTaken |
const SCEV * | SymbolicMaxNotTaken |
bool | MaxOrZero = false |
SmallPtrSet< const SCEVPredicate *, 4 > | Predicates |
A set of predicate guards for this ExitLimit. | |
Information about the number of loop iterations for which a loop exit's branch condition evaluates to the not-taken path.
This is a temporary pair of exact and max expressions that are eventually summarized in ExitNotTakenInfo and BackedgeTakenInfo.
Definition at line 1091 of file ScalarEvolution.h.
Construct either an exact exit limit from a constant, or an unknown one from a SCEVCouldNotCompute.
No other types of SCEVs are allowed as arguments and asserts enforce that internally.
Definition at line 8574 of file ScalarEvolution.cpp.
ScalarEvolution::ExitLimit::ExitLimit | ( | const SCEV * | E, |
const SCEV * | ConstantMaxNotTaken, | ||
const SCEV * | SymbolicMaxNotTaken, | ||
bool | MaxOrZero, | ||
ArrayRef< const SmallPtrSetImpl< const SCEVPredicate * > * > | PredSetList = std::nullopt |
||
) |
Definition at line 8577 of file ScalarEvolution.cpp.
References addPredicate(), assert(), ConstantMaxNotTaken, E, ExactNotTaken, llvm::SCEV::getType(), llvm::Type::isPointerTy(), llvm::SCEV::isZero(), P, and SymbolicMaxNotTaken.
ScalarEvolution::ExitLimit::ExitLimit | ( | const SCEV * | E, |
const SCEV * | ConstantMaxNotTaken, | ||
const SCEV * | SymbolicMaxNotTaken, | ||
bool | MaxOrZero, | ||
const SmallPtrSetImpl< const SCEVPredicate * > & | PredSet | ||
) |
Definition at line 8613 of file ScalarEvolution.cpp.
|
inline |
Definition at line 1105 of file ScalarEvolution.h.
References assert(), P, and Predicates.
Referenced by ExitLimit().
|
inline |
Test whether this ExitLimit contains any computed information, or whether it's all SCEVCouldNotCompute values.
Definition at line 1127 of file ScalarEvolution.h.
References ConstantMaxNotTaken, and ExactNotTaken.
|
inline |
Test whether this ExitLimit contains all information.
Definition at line 1133 of file ScalarEvolution.h.
References ExactNotTaken.
Definition at line 1093 of file ScalarEvolution.h.
Referenced by ExitLimit(), and hasAnyInfo().
Definition at line 1092 of file ScalarEvolution.h.
Referenced by ExitLimit(), hasAnyInfo(), and hasFullInfo().
bool llvm::ScalarEvolution::ExitLimit::MaxOrZero = false |
Definition at line 1098 of file ScalarEvolution.h.
SmallPtrSet<const SCEVPredicate *, 4> llvm::ScalarEvolution::ExitLimit::Predicates |
A set of predicate guards for this ExitLimit.
The result is only valid if all of the predicates in Predicates
evaluate to 'true' at run-time.
Definition at line 1103 of file ScalarEvolution.h.
Referenced by addPredicate().
Definition at line 1095 of file ScalarEvolution.h.
Referenced by ExitLimit(), and optimizeLoopExitWithUnknownExitCount().