|
LLVM 24.0.0git
|
A struct for saving information about monotonic variables. More...
#include "llvm/Analysis/IVDescriptors.h"
Public Member Functions | |
| MonotonicDescriptor ()=default | |
| PHINode * | getHeaderPHI () const |
| Returns the header PHI described by this descriptor. | |
| PHINode * | getBackedgePHI () const |
| Returns the backedge PHI that selects between StepInst and the HeaderPHI. | |
| Instruction * | getStepInst () const |
| Returns the instruction that updates the value of the monotonic PHI. | |
| const SCEV * | getStartSCEV () const |
| Returns a SCEV expression for the initial value of the monotonic PHI. | |
| const SCEV * | getStepSCEV () const |
| Returns a SCEV expression for the step of the monotonic PHI. | |
| unsigned | getSCEVNoWrapFlags () const |
| Returns the SCEV no-wrap flags that apply to StepInst. | |
Static Public Member Functions | |
| static LLVM_ABI bool | isMonotonicPHI (PHINode *PN, const Loop *L, MonotonicDescriptor &Desc, ScalarEvolution &SE) |
Returns true if PN is a monotonic variable in the loop L. | |
A struct for saving information about monotonic variables.
Monotonic variable can be considered as a "conditional" induction variable: its update happens only on loop iterations for which a certain predicate is satisfied. The step of the monotonic variable must be loop-invariant.
Definition at line 489 of file IVDescriptors.h.
|
default |
References LLVM_ABI, and MonotonicDescriptor().
Referenced by isMonotonicPHI(), and MonotonicDescriptor().
|
inline |
Returns the backedge PHI that selects between StepInst and the HeaderPHI.
Definition at line 504 of file IVDescriptors.h.
|
inline |
Returns the header PHI described by this descriptor.
Definition at line 501 of file IVDescriptors.h.
|
inline |
Returns the SCEV no-wrap flags that apply to StepInst.
Definition at line 518 of file IVDescriptors.h.
Returns a SCEV expression for the initial value of the monotonic PHI.
Definition at line 510 of file IVDescriptors.h.
|
inline |
Returns the instruction that updates the value of the monotonic PHI.
Definition at line 507 of file IVDescriptors.h.
Returns a SCEV expression for the step of the monotonic PHI.
This is the value the monotonic PHI increments by on loop iterations where the predicate is satisfied.
Definition at line 515 of file IVDescriptors.h.
|
static |
Returns true if PN is a monotonic variable in the loop L.
If PN is monotonic, the monotonic descriptor D will contain the data describing the PHI.
Definition at line 1712 of file IVDescriptors.cpp.
References llvm::cast(), llvm::dbgs(), llvm::dyn_cast(), llvm::find_singleton(), llvm::SCEV::FlagAnyWrap, llvm::SCEV::FlagNSW, llvm::SCEV::FlagNUW, GEP, llvm::ScalarEvolution::getEffectiveSCEVType(), llvm::ScalarEvolution::getSCEV(), llvm::ScalarEvolution::getTruncateOrSignExtend(), llvm::SCEV::getType(), llvm::Value::getType(), llvm::Value::hasOneUse(), llvm::Type::isIntOrPtrTy(), llvm::ScalarEvolution::isKnownNonNegative(), llvm::Type::isPointerTy(), LLVM_DEBUG, llvm::PatternMatch::m_c_Add(), llvm::PatternMatch::m_PtrAdd(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), MonotonicDescriptor(), llvm::ScalarEvolution::setFlags(), llvm::to_underlying(), and llvm::Value::users().