summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-06-29 21:31:18 +0000
committerDan Gohman <gohman@apple.com>2009-06-29 21:31:18 +0000
commit9d203c636b663abe1fa9bdc2c678ac112f8c623e (patch)
tree9b4a3b1419a9dacd538901a0be658f0423e42ae2
parent231898baf530c713a437a48c9bed328290966dd8 (diff)
downloadbcm5719-llvm-9d203c636b663abe1fa9bdc2c678ac112f8c623e.tar.gz
bcm5719-llvm-9d203c636b663abe1fa9bdc2c678ac112f8c623e.zip
Use getSCEV instead of getUnknown to create a SCEV for a
Constant. This lets ConstantInts be handled as SCEVConstant instead of SCEVUnknown, as getUnknown no longer has special-case code for ConstantInt and friends. This usually doesn't affect the final output, since the constants end up getting folded later, but it does make intermediate expressions more obvious in many cases. llvm-svn: 74459
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index e38b24c0b57..2b8277864eb 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -3572,7 +3572,7 @@ const SCEV* ScalarEvolution::getSCEVAtScope(const SCEV *V, const Loop *L) {
Constant *RV = getConstantEvolutionLoopExitValue(PN,
BTCC->getValue()->getValue(),
LI);
- if (RV) return getUnknown(RV);
+ if (RV) return getSCEV(RV);
}
}
@@ -3586,7 +3586,7 @@ const SCEV* ScalarEvolution::getSCEVAtScope(const SCEV *V, const Loop *L) {
std::pair<std::map<const Loop *, Constant *>::iterator, bool> Pair =
Values.insert(std::make_pair(L, static_cast<Constant *>(0)));
if (!Pair.second)
- return Pair.first->second ? &*getUnknown(Pair.first->second) : V;
+ return Pair.first->second ? &*getSCEV(Pair.first->second) : V;
std::vector<Constant*> Operands;
Operands.reserve(I->getNumOperands());
@@ -3635,7 +3635,7 @@ const SCEV* ScalarEvolution::getSCEVAtScope(const SCEV *V, const Loop *L) {
C = ConstantFoldInstOperands(I->getOpcode(), I->getType(),
&Operands[0], Operands.size());
Pair.first->second = C;
- return getUnknown(C);
+ return getSCEV(C);
}
}
OpenPOWER on IntegriCloud