diff options
author | Dan Gohman <gohman@apple.com> | 2009-05-01 16:58:31 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-05-01 16:58:31 +0000 |
commit | 99a1302ae4c438ab532826685280c0b69687e163 (patch) | |
tree | f16f2354704c037ff654547e5a1e0d7497d2924f | |
parent | 3d81e317244ecac40d1977221a4a521589b869f5 (diff) |
Make SCEVExpander::addInsertedValue able to accept Values, not just
Instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70552 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Analysis/ScalarEvolutionExpander.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h index b6b45788ea..6290c40123 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpander.h +++ b/include/llvm/Analysis/ScalarEvolutionExpander.h @@ -30,7 +30,7 @@ namespace llvm { ScalarEvolution &SE; LoopInfo &LI; std::map<SCEVHandle, Value*> InsertedExpressions; - std::set<Instruction*> InsertedInstructions; + std::set<Value*> InsertedValues; BasicBlock::iterator InsertPt; @@ -50,7 +50,7 @@ namespace llvm { /// inserted by the code rewriter. If so, the client should not modify the /// instruction. bool isInsertedInstruction(Instruction *I) const { - return InsertedInstructions.count(I); + return InsertedValues.count(I); } /// getOrInsertCanonicalInductionVariable - This method returns the @@ -66,9 +66,9 @@ namespace llvm { /// addInsertedValue - Remember the specified instruction as being the /// canonical form for the specified SCEV. - void addInsertedValue(Instruction *I, const SCEV *S) { - InsertedExpressions[S] = (Value*)I; - InsertedInstructions.insert(I); + void addInsertedValue(Value *V, const SCEV *S) { + InsertedExpressions[S] = V; + InsertedValues.insert(V); } void setInsertionPoint(BasicBlock::iterator NewIP) { InsertPt = NewIP; } |