X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FAnalysis%2FIVUsers.h;h=37d01490dac6a2de8dd069dd8f13bcc6321c7558;hb=f3e6026b5b25b0c6e9a7f7f0df7f4df3dbccc5d9;hp=58d347ed19b9cc255d2ff7483e26290e3c738c2c;hpb=ec89b9fb9ed78dbb783897774e5d7bab376c169a;p=oota-llvm.git diff --git a/include/llvm/Analysis/IVUsers.h b/include/llvm/Analysis/IVUsers.h index 58d347ed19b..37d01490dac 100644 --- a/include/llvm/Analysis/IVUsers.h +++ b/include/llvm/Analysis/IVUsers.h @@ -17,10 +17,11 @@ #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/ScalarEvolutionNormalization.h" -#include "llvm/Support/ValueHandle.h" +#include "llvm/IR/ValueHandle.h" namespace llvm { +class AssumptionCache; class DominatorTree; class Instruction; class Value; @@ -33,7 +34,7 @@ class DataLayout; /// The Expr member keeps track of the expression, User is the actual user /// instruction of the operand, and 'OperandValToReplace' is the operand of /// the User that is the use. -class IVStrideUse : public CallbackVH, public ilist_node { +class IVStrideUse final : public CallbackVH, public ilist_node { friend class IVUsers; public: IVStrideUse(IVUsers *P, Instruction* U, Value *O) @@ -86,7 +87,7 @@ private: /// Deleted - Implementation of CallbackVH virtual function to /// receive notification when the User is deleted. - virtual void deleted(); + void deleted() override; }; template<> struct ilist_traits @@ -119,21 +120,24 @@ private: class IVUsers : public LoopPass { friend class IVStrideUse; Loop *L; + AssumptionCache *AC; LoopInfo *LI; DominatorTree *DT; ScalarEvolution *SE; - const DataLayout *DL; - SmallPtrSet Processed; + SmallPtrSet Processed; /// IVUses - A list of all tracked IV uses of induction variable expressions /// we are interested in. ilist IVUses; - virtual void getAnalysisUsage(AnalysisUsage &AU) const; + // Ephemeral values used by @llvm.assume in this function. + SmallPtrSet EphValues; - virtual bool runOnLoop(Loop *L, LPPassManager &LPM); + void getAnalysisUsage(AnalysisUsage &AU) const override; - virtual void releaseMemory(); + bool runOnLoop(Loop *L, LPPassManager &LPM) override; + + void releaseMemory() override; public: static char ID; // Pass ID, replacement for typeid @@ -169,12 +173,12 @@ public: return Processed.count(Inst); } - void print(raw_ostream &OS, const Module* = 0) const; + void print(raw_ostream &OS, const Module* = nullptr) const override; /// dump - This method is used for debugging. void dump() const; protected: - bool AddUsersImpl(Instruction *I, SmallPtrSet &SimpleLoopNests); + bool AddUsersImpl(Instruction *I, SmallPtrSetImpl &SimpleLoopNests); }; Pass *createIVUsersPass();