diff options
-rw-r--r-- | include/llvm/Analysis/ScalarEvolution.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index dc651dbdc3..c5a892ced2 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -250,6 +250,14 @@ namespace llvm { /// starts at zero and steps by one on each iteration. Value *GetOrInsertCanonicalInductionVariable(const Loop *L, const Type *Ty); + + /// addInsertedValue - Remember the specified instruction as being the + /// canonical form for the specified SCEV. + void addInsertedValue(Instruction *I, SCEV *S) { + InsertedExpressions[S] = I; + InsertedInstructions.insert(I); + } + /// ExpandCodeFor - Insert code to directly compute the specified SCEV /// expression into the program. The inserted code is inserted into the /// specified block. |