summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-05-01 16:58:31 +0000
committerDan Gohman <gohman@apple.com>2009-05-01 16:58:31 +0000
commit719f7d5c864065c4402619ebb71191d9b71dee5f (patch)
tree3f028c064219c3ddf70391e169c5c0cb33647817 /llvm/include
parentd3aa4215effcf26d5a0ddde09925baa9d48488dd (diff)
downloadbcm5719-llvm-719f7d5c864065c4402619ebb71191d9b71dee5f.tar.gz
bcm5719-llvm-719f7d5c864065c4402619ebb71191d9b71dee5f.zip
Make SCEVExpander::addInsertedValue able to accept Values, not just
Instructions. llvm-svn: 70552
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Analysis/ScalarEvolutionExpander.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h b/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h
index b6b45788ea7..6290c401234 100644
--- a/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h
+++ b/llvm/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; }
OpenPOWER on IntegriCloud