[llvm-commits] [llvm] r70552 - /llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h
Dan Gohman
gohman at apple.com
Fri May 1 09:58:32 PDT 2009
Author: djg
Date: Fri May 1 11:58:31 2009
New Revision: 70552
URL: http://llvm.org/viewvc/llvm-project?rev=70552&view=rev
Log:
Make SCEVExpander::addInsertedValue able to accept Values, not just
Instructions.
Modified:
llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h
Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h?rev=70552&r1=70551&r2=70552&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpander.h Fri May 1 11:58:31 2009
@@ -30,7 +30,7 @@
ScalarEvolution &SE;
LoopInfo &LI;
std::map<SCEVHandle, Value*> InsertedExpressions;
- std::set<Instruction*> InsertedInstructions;
+ std::set<Value*> InsertedValues;
BasicBlock::iterator InsertPt;
@@ -50,7 +50,7 @@
/// 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 @@
/// 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; }
More information about the llvm-commits
mailing list