15 #ifndef LLVM_ANALYSIS_IVUSERS_H
16 #define LLVM_ANALYSIS_IVUSERS_H
24 class AssumptionCache;
28 class ScalarEvolution;
41 :
CallbackVH(U), Parent(P), OperandValToReplace(O) {
57 return OperandValToReplace;
63 OperandValToReplace = Op;
82 WeakVH OperandValToReplace;
90 void deleted()
override;
140 void releaseMemory()
override;
170 bool empty()
const {
return IVUses.empty(); }
173 return Processed.count(Inst);
const SCEV * getExpr(const IVStrideUse &IU) const
getExpr - Return the expression for the use.
const PostIncLoopSet & getPostIncLoops() const
getPostIncLoops - Return the set of loops for which the expression has been adjusted to use post-inc ...
IVStrideUse * createSentinel() const
A Module instance is used to store all the information related to an LLVM module. ...
Pass * createIVUsersPass()
ScalarEvolution - This class is the main scalar evolution driver.
void setOperandValToReplace(Value *Op)
setOperandValToReplace - Assign a new Value as the operand value to replace.
A cache of .assume calls within a function.
void print(raw_ostream &OS, const Module *=nullptr) const override
print - Print out the internal state of the pass.
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
bool AddUsersIfInteresting(Instruction *I)
AddUsersIfInteresting - Inspect the specified Instruction.
const SCEV * getStride(const IVStrideUse &IU, const Loop *L) const
IVStrideUse * provideInitialHead() const
const_iterator begin() const
ilist_default_traits - Default template traits for intrusive list.
static void noteHead(IVStrideUse *, IVStrideUse *)
IVStrideUse * ensureHead(IVStrideUse *) const
Value handle that is nullable, but tries to track the Value.
const_iterator end() const
Instruction * getUser() const
getUser - Return the user instruction for this use.
ilist< IVStrideUse >::const_iterator const_iterator
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
void setUser(Instruction *NewUser)
setUser - Assign a new user instruction for this use.
bool AddUsersImpl(Instruction *I, SmallPtrSetImpl< Loop * > &SimpleLoopNests)
AddUsersImpl - Inspect the specified instruction.
Value * getValPtr() const
const SCEV * getReplacementExpr(const IVStrideUse &IU) const
getReplacementExpr - Return a SCEV expression which computes the value of the OperandValToReplace of ...
Represent the analysis usage information of a pass.
ilist< IVStrideUse >::iterator iterator
bool isIVUserOrOperand(Instruction *Inst) const
Value * getOperandValToReplace() const
getOperandValToReplace - Return the Value of the operand in the user instruction that this IVStrideUs...
void dump() const
dump - This method is used for debugging.
IVStrideUse(IVUsers *P, Instruction *U, Value *O)
SCEV - This class represents an analyzed expression in the program.
ilist_node - Base class that provides next/prev services for nodes that use ilist_nextprev_traits or ...
void transformToPostInc(const Loop *L)
transformToPostInc - Transform the expression to post-inc form for the given loop.
static NodeTy * createSentinel()
createSentinel - create the dynamic sentinel
LLVM Value Representation.
static void destroySentinel(IVStrideUse *)
IVStrideUse - Keep track of one use of a strided induction variable.
This class implements an extremely fast bulk output stream that can only output to a stream...
Value handle with callbacks on RAUW and destruction.
IVStrideUse & AddUser(Instruction *User, Value *Operand)