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;
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)) {
145 iterator
begin() {
return IVUses.begin(); }
146 iterator
end() {
return IVUses.end(); }
147 const_iterator
begin()
const {
return IVUses.begin(); }
148 const_iterator
end()
const {
return IVUses.end(); }
149 bool empty()
const {
return IVUses.empty(); }
152 return Processed.
count(Inst);
155 void releaseMemory();
169 std::unique_ptr<IVUsers> IU;
183 void releaseMemory()
override;
Pass interface - Implemented by all 'passes'.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
Pass * createIVUsersPass()
The main scalar evolution driver.
CallbackVH & operator=(const CallbackVH &)=default
void setOperandValToReplace(Value *Op)
setOperandValToReplace - Assign a new Value as the operand value to replace.
A cache of @llvm.assume calls within a function.
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...
bool isIVUserOrOperand(Instruction *Inst) const
const IVUsers & getIU() const
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
Value handle that is nullable, but tries to track the Value.
This header provides classes for managing per-loop analyses.
ilist< IVStrideUse >::const_iterator const_iterator
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
void setUser(Instruction *NewUser)
setUser - Assign a new user instruction for this use.
A CRTP mix-in that provides informational APIs needed for analysis passes.
Represent the analysis usage information of a pass.
ilist< IVStrideUse >::iterator iterator
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
const PostIncLoopSet & getPostIncLoops() const
getPostIncLoops - Return the set of loops for which the expression has been adjusted to use post-inc ...
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.
IVStrideUse(IVUsers *P, Instruction *U, Value *O)
MCExpr const & getExpr(MCExpr const &Expr)
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.
Value * getOperandValToReplace() const
getOperandValToReplace - Return the Value of the operand in the user instruction that this IVStrideUs...
const_iterator begin() const
void transformToPostInc(const Loop *L)
transformToPostInc - Transform the expression to post-inc form for the given loop.
LLVM Value Representation.
const_iterator end() const
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.
Instruction * getUser() const
getUser - Return the user instruction for this use.
A special type used by analysis passes to provide an address that identifies that particular analysis...
Value * getValPtr() const