From 334bee87f4a009fdbb67512f030377a067074e98 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 22 Apr 2004 14:56:51 +0000 Subject: [PATCH] Add a method llvm-svn: 13105 --- llvm/include/llvm/Analysis/ScalarEvolution.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index dc651dbdc347..c5a892ced228 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/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.