15#ifndef LLVM_TRANSFORMS_UTILS_SIMPLIFYINDVAR_H
16#define LLVM_TRANSFORMS_UTILS_SIMPLIFYINDVAR_H
24template <
typename T>
class SmallVectorImpl;
32class TargetTransformInfo;
86 unsigned &NumElimExt,
unsigned &NumWidened,
static cl::opt< bool > UsePostIncrementRanges("indvars-post-increment-ranges", cl::Hidden, cl::desc("Use post increment control-dependent ranges in IndVarSimplify"), cl::init(true))
This is the base class for all instructions that perform data casts.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
Interface for visiting interesting IV users that are recognized but not simplified by this utility.
virtual ~IVVisitor()=default
virtual void visitCast(CastInst *Cast)=0
const DominatorTree * getDomTree() const
Represents a single loop in the control flow graph.
This class uses information about analyze scalars to rewrite expressions in canonical form.
The main scalar evolution driver.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
The instances of the Type class are immutable: once they are created, they are never changed.
This is an optimization pass for GlobalISel generic memory operations.
PHINode * createWideIV(const WideIVInfo &WI, LoopInfo *LI, ScalarEvolution *SE, SCEVExpander &Rewriter, DominatorTree *DT, SmallVectorImpl< WeakTrackingVH > &DeadInsts, unsigned &NumElimExt, unsigned &NumWidened, bool HasGuards, bool UsePostIncrementRanges)
Widen Induction Variables - Extend the width of an IV to cover its widest uses.
bool simplifyLoopIVs(Loop *L, ScalarEvolution *SE, DominatorTree *DT, LoopInfo *LI, const TargetTransformInfo *TTI, SmallVectorImpl< WeakTrackingVH > &Dead)
SimplifyLoopIVs - Simplify users of induction variables within this loop.
std::pair< bool, bool > simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE, DominatorTree *DT, LoopInfo *LI, const TargetTransformInfo *TTI, SmallVectorImpl< WeakTrackingVH > &Dead, SCEVExpander &Rewriter, IVVisitor *V=nullptr)
simplifyUsersOfIV - Simplify instructions that use this induction variable by using ScalarEvolution t...
Collect information about induction variables that are used by sign/zero extend operations.