Go to the documentation of this file.
14 #ifndef LLVM_ANALYSIS_IVUSERS_H
15 #define LLVM_ANALYSIS_IVUSERS_H
24 class AssumptionCache;
26 class ScalarEvolution;
54 return OperandValToReplace;
60 OperandValToReplace =
Op;
87 void deleted()
override;
145 bool empty()
const {
return IVUses.empty(); }
148 return Processed.
count(Inst);
162 std::unique_ptr<IVUsers> IU;
void setOperandValToReplace(Value *Op)
setOperandValToReplace - Assign a new Value as the operand value to replace.
Analysis pass that exposes the IVUsers for a loop.
This is an optimization pass for GlobalISel generic memory operations.
print lazy value Lazy Value Info Printer Pass
Value handle that is nullable, but tries to track the Value.
Represents a single loop in the control flow graph.
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
The main scalar evolution driver.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
ilist< IVStrideUse >::const_iterator const_iterator
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...
Value * getValPtr() const
IVStrideUse - Keep track of one use of a strided induction variable.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
An intrusive list with ownership and callbacks specified/controlled by ilist_traits,...
Value * getOperandValToReplace() const
getOperandValToReplace - Return the Value of the operand in the user instruction that this IVStrideUs...
const_iterator end() const
void setUser(Instruction *NewUser)
setUser - Assign a new user instruction for this use.
Represent the analysis usage information of a pass.
ilist< IVStrideUse >::iterator iterator
bool isIVUserOrOperand(Instruction *Inst) const
Instruction * getUser() const
getUser - Return the user instruction for this use.
This class implements an extremely fast bulk output stream that can only output to a stream.
IVUsers(Loop *L, AssumptionCache *AC, LoopInfo *LI, DominatorTree *DT, ScalarEvolution *SE)
const SCEV * getReplacementExpr(const IVStrideUse &IU) const
getReplacementExpr - Return a SCEV expression which computes the value of the OperandValToReplace of ...
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
void print(raw_ostream &OS, const Module *=nullptr) const
const PostIncLoopSet & getPostIncLoops() const
getPostIncLoops - Return the set of loops for which the expression has been adjusted to use post-inc ...
This class represents an analyzed expression in the program.
IVUsers & operator=(IVUsers &&)=delete
const IVUsers & getIU() const
A special type used by analysis passes to provide an address that identifies that particular analysis...
IVStrideUse & AddUser(Instruction *User, Value *Operand)
const SCEV * getStride(const IVStrideUse &IU, const Loop *L) const
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
A Module instance is used to store all the information related to an LLVM module.
A CRTP mix-in that provides informational APIs needed for analysis passes.
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
A cache of @llvm.assume calls within a function.
const_iterator begin() const
const SCEV * getExpr(const IVStrideUse &IU) const
getExpr - Return the expression for the use.
bool runOnLoop(Loop *L, LPPassManager &LPM) override
IVUsers run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR)
void transformToPostInc(const Loop *L)
transformToPostInc - Transform the expression to post-inc form for the given loop.
Iterator for intrusive lists based on ilist_node.
Value handle with callbacks on RAUW and destruction.
IVStrideUse(IVUsers *P, Instruction *U, Value *O)
bool AddUsersIfInteresting(Instruction *I)
AddUsersIfInteresting - Inspect the specified Instruction.
Pass * createIVUsersPass()
void print(raw_ostream &OS, const Module *=nullptr) const override
print - Print out the internal state of the pass.
A container for analyses that lazily runs them and caches their results.
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
LLVM Value Representation.
void dump() const
dump - This method is used for debugging.