15 #ifndef LLVM_ANALYSIS_IVUSERS_H
16 #define LLVM_ANALYSIS_IVUSERS_H
25 class AssumptionCache;
29 class ScalarEvolution;
42 :
CallbackVH(U), Parent(P), OperandValToReplace(O) {
58 return OperandValToReplace;
64 OperandValToReplace =
Op;
83 WeakVH OperandValToReplace;
91 void deleted()
override;
115 :
L(std::move(
X.
L)), AC(std::move(
X.AC)), DT(std::move(
X.DT)),
116 SE(std::move(
X.SE)), Processed(std::move(
X.Processed)),
117 IVUses(std::move(
X.IVUses)), EphValues(std::move(
X.EphValues)) {
149 bool empty()
const {
return IVUses.empty(); }
152 return Processed.count(Inst);
169 std::unique_ptr<IVUsers> IU;
bool runOnLoop(Loop *L, LPPassManager &LPM) override
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 ...
A Module instance is used to store all the information related to an LLVM module. ...
aarch64 AArch64 CCMP Pass
Pass * createIVUsersPass()
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
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...
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
const_iterator begin() const
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
IVUsers & operator=(IVUsers &&)=delete
const IVUsers & getIU() const
Value handle that is nullable, but tries to track the Value.
const_iterator end() const
This header provides classes for managing per-loop analyses.
Instruction * getUser() const
getUser - Return the user instruction for this use.
void dump() const
dump - This method is used for debugging.
ilist< IVStrideUse >::const_iterator const_iterator
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
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
IVUsers run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR)
A CRTP mix-in that provides informational APIs needed for analysis passes.
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
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
bool isIVUserOrOperand(Instruction *Inst) const
An intrusive list with ownership and callbacks specified/controlled by ilist_traits, only with API safe for polymorphic types.
Iterator for intrusive lists based on ilist_node.
Value * getOperandValToReplace() const
getOperandValToReplace - Return the Value of the operand in the user instruction that this IVStrideUs...
IVStrideUse(IVUsers *P, Instruction *U, Value *O)
IVUsers(Loop *L, AssumptionCache *AC, LoopInfo *LI, DominatorTree *DT, ScalarEvolution *SE)
This class represents an analyzed expression in the program.
Analysis pass that exposes the IVUsers for a loop.
Represents a single loop in the control flow graph.
void transformToPostInc(const Loop *L)
transformToPostInc - Transform the expression to post-inc form for the given loop.
LLVM Value Representation.
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.
A container for analyses that lazily runs them and caches their results.
IVStrideUse & AddUser(Instruction *User, Value *Operand)
A special type used by analysis passes to provide an address that identifies that particular analysis...
void print(raw_ostream &OS, const Module *=nullptr) const override
print - Print out the internal state of the pass.