class InductionDescriptor
Declaration
class InductionDescriptor { /* full declaration omitted */ };
Description
A struct for saving information about induction variables.
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:260
Method Overview
- public InductionDescriptor()
- public const SmallVectorImpl<llvm::Instruction *> & getCastInsts() const
- public int getConsecutiveDirection() const
- public llvm::ConstantInt * getConstIntStepValue() const
- public llvm::BinaryOperator * getInductionBinOp() const
- public Instruction::BinaryOps getInductionOpcode() const
- public llvm::InductionDescriptor::InductionKind getKind() const
- public llvm::Value * getStartValue() const
- public const llvm::SCEV * getStep() const
- public llvm::Instruction * getUnsafeAlgebraInst()
- public bool hasUnsafeAlgebra()
- public static bool isFPInductionPHI(llvm::PHINode * Phi, const llvm::Loop * L, llvm::ScalarEvolution * SE, llvm::InductionDescriptor & D)
- public static bool isInductionPHI(llvm::PHINode * Phi, const llvm::Loop * L, llvm::ScalarEvolution * SE, llvm::InductionDescriptor & D, const llvm::SCEV * Expr = nullptr, SmallVectorImpl<llvm::Instruction *> * CastsToIgnore = nullptr)
- public static bool isInductionPHI(llvm::PHINode * Phi, const llvm::Loop * L, llvm::PredicatedScalarEvolution & PSE, llvm::InductionDescriptor & D, bool Assume = false)
Methods
¶InductionDescriptor()
InductionDescriptor()
Description
Default constructor - creates an invalid induction.
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:272
¶const SmallVectorImpl<llvm::Instruction*>&
getCastInsts() const
const SmallVectorImpl<llvm::Instruction*>&
getCastInsts() const
Description
Returns a reference to the type cast instructions in the induction update chain, that are redundant when guarded with a runtime SCEV overflow check.
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:342
¶int getConsecutiveDirection() const
int getConsecutiveDirection() const
Description
Get the consecutive direction. Returns: 0 - unknown or non-consecutive. 1 - consecutive and increasing. -1 - consecutive and decreasing.
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:278
¶llvm::ConstantInt* getConstIntStepValue() const
llvm::ConstantInt* getConstIntStepValue() const
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:284
¶llvm::BinaryOperator* getInductionBinOp() const
llvm::BinaryOperator* getInductionBinOp() const
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:283
¶Instruction::BinaryOps getInductionOpcode() const
Instruction::BinaryOps getInductionOpcode() const
Description
Returns binary opcode of the induction operator.
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:334
¶llvm::InductionDescriptor::InductionKind getKind()
const
llvm::InductionDescriptor::InductionKind getKind()
const
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:281
¶llvm::Value* getStartValue() const
llvm::Value* getStartValue() const
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:280
¶const llvm::SCEV* getStep() const
const llvm::SCEV* getStep() const
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:282
¶llvm::Instruction* getUnsafeAlgebraInst()
llvm::Instruction* getUnsafeAlgebraInst()
Description
Returns induction operator that does not have "fast-math" property and requires FP unsafe mode.
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:324
¶bool hasUnsafeAlgebra()
bool hasUnsafeAlgebra()
Description
Returns true if the induction type is FP and the binary operator does not have the "fast-math" property. Such operation requires a relaxed FP mode.
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:317
¶static bool isFPInductionPHI(
llvm::PHINode* Phi,
const llvm::Loop* L,
llvm::ScalarEvolution* SE,
llvm::InductionDescriptor& D)
static bool isFPInductionPHI(
llvm::PHINode* Phi,
const llvm::Loop* L,
llvm::ScalarEvolution* SE,
llvm::InductionDescriptor& D)
Description
Returns true if \p Phi is a floating point induction in the loop \p L. If \p Phi is an induction, the induction descriptor \p D will contain the data describing this induction.
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:301
Parameters
- llvm::PHINode* Phi
- const llvm::Loop* L
- llvm::ScalarEvolution* SE
- llvm::InductionDescriptor& D
¶static bool isInductionPHI(
llvm::PHINode* Phi,
const llvm::Loop* L,
llvm::ScalarEvolution* SE,
llvm::InductionDescriptor& D,
const llvm::SCEV* Expr = nullptr,
SmallVectorImpl<llvm::Instruction*>*
CastsToIgnore = nullptr)
static bool isInductionPHI(
llvm::PHINode* Phi,
const llvm::Loop* L,
llvm::ScalarEvolution* SE,
llvm::InductionDescriptor& D,
const llvm::SCEV* Expr = nullptr,
SmallVectorImpl<llvm::Instruction*>*
CastsToIgnore = nullptr)
Description
Returns true if \p Phi is an induction in the loop \p L. If \p Phi is an induction, the induction descriptor \p D will contain the data describing this induction. If by some other means the caller has a better SCEV expression for \p Phi than the one returned by the ScalarEvolution analysis, it can be passed through \p Expr. If the def-use chain associated with the phi includes casts (that we know we can ignore under proper runtime checks), they are passed through \p CastsToIgnore.
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:294
Parameters
- llvm::PHINode* Phi
- const llvm::Loop* L
- llvm::ScalarEvolution* SE
- llvm::InductionDescriptor& D
- const llvm::SCEV* Expr = nullptr
- SmallVectorImpl<llvm::Instruction*>* CastsToIgnore = nullptr
¶static bool isInductionPHI(
llvm::PHINode* Phi,
const llvm::Loop* L,
llvm::PredicatedScalarEvolution& PSE,
llvm::InductionDescriptor& D,
bool Assume = false)
static bool isInductionPHI(
llvm::PHINode* Phi,
const llvm::Loop* L,
llvm::PredicatedScalarEvolution& PSE,
llvm::InductionDescriptor& D,
bool Assume = false)
Description
Returns true if \p Phi is a loop \p L induction, in the context associated with the run-time predicate of PSE. If \p Assume is true, this can add further SCEV predicates to \p PSE in order to prove that \p Phi is an induction. If \p Phi is an induction, \p D will contain the data describing this induction.
Declared at: llvm/include/llvm/Analysis/IVDescriptors.h:310
Parameters
- llvm::PHINode* Phi
- const llvm::Loop* L
- llvm::PredicatedScalarEvolution& PSE
- llvm::InductionDescriptor& D
- bool Assume = false