14#ifndef LLVM_ANALYSIS_IVUSERS_H
15#define LLVM_ANALYSIS_IVUSERS_H
39 :
CallbackVH(U), Parent(
P), OperandValToReplace(O) {
55 return OperandValToReplace;
61 OperandValToReplace =
Op;
88 void deleted()
override;
147 bool empty()
const {
return IVUses.empty(); }
150 return Processed.
count(Inst);
164 std::unique_ptr<IVUsers> IU;
aarch64 AArch64 CCMP Pass
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
This header provides classes for managing per-loop analyses.
A container for analyses that lazily runs them and caches their results.
Represent the analysis usage information of a pass.
A cache of @llvm.assume calls within a function.
Value handle with callbacks on RAUW and destruction.
This class represents an Operation in the Expression.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
IVStrideUse - Keep track of one use of a strided induction variable.
Instruction * getUser() const
getUser - Return the user instruction for this use.
void setOperandValToReplace(Value *Op)
setOperandValToReplace - Assign a new Value as the operand value to replace.
const PostIncLoopSet & getPostIncLoops() const
getPostIncLoops - Return the set of loops for which the expression has been adjusted to use post-inc ...
void transformToPostInc(const Loop *L)
transformToPostInc - Transform the expression to post-inc form for the given loop.
Value * getOperandValToReplace() const
getOperandValToReplace - Return the Value of the operand in the user instruction that this IVStrideUs...
IVStrideUse(IVUsers *P, Instruction *U, Value *O)
void setUser(Instruction *NewUser)
setUser - Assign a new user instruction for this use.
Analysis pass that exposes the IVUsers for a loop.
IVUsers run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR)
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
bool runOnLoop(Loop *L, LPPassManager &LPM) override
void print(raw_ostream &OS, const Module *=nullptr) const override
print - Print out the internal state of the pass.
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
const IVUsers & getIU() const
void dump() const
dump - This method is used for debugging.
ilist< IVStrideUse >::const_iterator const_iterator
bool isIVUserOrOperand(Instruction *Inst) const
IVStrideUse & AddUser(Instruction *User, Value *Operand)
IVUsers & operator=(IVUsers &&)=delete
const SCEV * getStride(const IVStrideUse &IU, const Loop *L) const
IVUsers(const IVUsers &)=delete
const SCEV * getReplacementExpr(const IVStrideUse &IU) const
getReplacementExpr - Return a SCEV expression which computes the value of the OperandValToReplace of ...
bool AddUsersIfInteresting(Instruction *I)
AddUsersIfInteresting - Inspect the specified Instruction.
const_iterator end() const
ilist< IVStrideUse >::iterator iterator
const_iterator begin() const
const SCEV * getExpr(const IVStrideUse &IU) const
getExpr - Return the expression for the use.
IVUsers & operator=(const IVUsers &)=delete
void print(raw_ostream &OS, const Module *=nullptr) const
Represents a single loop in the control flow graph.
A Module instance is used to store all the information related to an LLVM module.
This class represents an analyzed expression in the program.
The main scalar evolution driver.
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
Value * getValPtr() const
LLVM Value Representation.
Value handle that is nullable, but tries to track the Value.
base_list_type::const_iterator const_iterator
base_list_type::iterator iterator
An intrusive list with ownership and callbacks specified/controlled by ilist_traits,...
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
DWARFExpression::Operation Op
Pass * createIVUsersPass()
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...