Mercurial > hg > CbC > CbC_llvm
comparison include/llvm/Analysis/IVUsers.h @ 95:afa8332a0e37 LLVM3.8
LLVM 3.8
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Oct 2015 17:48:58 +0900 |
parents | 54457678186b |
children | 1172e4bd9c6f |
comparison
equal
deleted
inserted
replaced
84:f3e34b893a5f | 95:afa8332a0e37 |
---|---|
19 #include "llvm/Analysis/ScalarEvolutionNormalization.h" | 19 #include "llvm/Analysis/ScalarEvolutionNormalization.h" |
20 #include "llvm/IR/ValueHandle.h" | 20 #include "llvm/IR/ValueHandle.h" |
21 | 21 |
22 namespace llvm { | 22 namespace llvm { |
23 | 23 |
24 class AssumptionCache; | |
24 class DominatorTree; | 25 class DominatorTree; |
25 class Instruction; | 26 class Instruction; |
26 class Value; | 27 class Value; |
27 class ScalarEvolution; | 28 class ScalarEvolution; |
28 class SCEV; | 29 class SCEV; |
31 | 32 |
32 /// IVStrideUse - Keep track of one use of a strided induction variable. | 33 /// IVStrideUse - Keep track of one use of a strided induction variable. |
33 /// The Expr member keeps track of the expression, User is the actual user | 34 /// The Expr member keeps track of the expression, User is the actual user |
34 /// instruction of the operand, and 'OperandValToReplace' is the operand of | 35 /// instruction of the operand, and 'OperandValToReplace' is the operand of |
35 /// the User that is the use. | 36 /// the User that is the use. |
36 class IVStrideUse : public CallbackVH, public ilist_node<IVStrideUse> { | 37 class IVStrideUse final : public CallbackVH, public ilist_node<IVStrideUse> { |
37 friend class IVUsers; | 38 friend class IVUsers; |
38 public: | 39 public: |
39 IVStrideUse(IVUsers *P, Instruction* U, Value *O) | 40 IVStrideUse(IVUsers *P, Instruction* U, Value *O) |
40 : CallbackVH(U), Parent(P), OperandValToReplace(O) { | 41 : CallbackVH(U), Parent(P), OperandValToReplace(O) { |
41 } | 42 } |
117 }; | 118 }; |
118 | 119 |
119 class IVUsers : public LoopPass { | 120 class IVUsers : public LoopPass { |
120 friend class IVStrideUse; | 121 friend class IVStrideUse; |
121 Loop *L; | 122 Loop *L; |
123 AssumptionCache *AC; | |
122 LoopInfo *LI; | 124 LoopInfo *LI; |
123 DominatorTree *DT; | 125 DominatorTree *DT; |
124 ScalarEvolution *SE; | 126 ScalarEvolution *SE; |
125 const DataLayout *DL; | 127 SmallPtrSet<Instruction*, 16> Processed; |
126 SmallPtrSet<Instruction*,16> Processed; | |
127 | 128 |
128 /// IVUses - A list of all tracked IV uses of induction variable expressions | 129 /// IVUses - A list of all tracked IV uses of induction variable expressions |
129 /// we are interested in. | 130 /// we are interested in. |
130 ilist<IVStrideUse> IVUses; | 131 ilist<IVStrideUse> IVUses; |
132 | |
133 // Ephemeral values used by @llvm.assume in this function. | |
134 SmallPtrSet<const Value *, 32> EphValues; | |
131 | 135 |
132 void getAnalysisUsage(AnalysisUsage &AU) const override; | 136 void getAnalysisUsage(AnalysisUsage &AU) const override; |
133 | 137 |
134 bool runOnLoop(Loop *L, LPPassManager &LPM) override; | 138 bool runOnLoop(Loop *L, LPPassManager &LPM) override; |
135 | 139 |