aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-04-23 15:16:49 +0000
committerDan Gohman <gohman@apple.com>2009-04-23 15:16:49 +0000
commit752ec7da506f5d41c08bd37e195750b57550ce68 (patch)
tree29c9aa4f22339fc36ee937332eb664934ada172a /lib/Analysis/ScalarEvolutionExpander.cpp
parentb1f321b5539a7f14864c0dc7ed44176785c62d14 (diff)
Change SCEVExpander's expandCodeFor to provide more flexibility
with the persistent insertion point, and change IndVars to make use of it. This fixes a bug where IndVars was holding on to a stale insertion point and forcing the SCEVExpander to continue to use it. This fixes PR4038. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r--lib/Analysis/ScalarEvolutionExpander.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp
index 80b47d8924..9676ea20af 100644
--- a/lib/Analysis/ScalarEvolutionExpander.cpp
+++ b/lib/Analysis/ScalarEvolutionExpander.cpp
@@ -332,12 +332,10 @@ Value *SCEVExpander::visitUMaxExpr(const SCEVUMaxExpr *S) {
return LHS;
}
-Value *SCEVExpander::expandCodeFor(SCEVHandle SH, const Type *Ty,
- BasicBlock::iterator IP) {
+Value *SCEVExpander::expandCodeFor(SCEVHandle SH, const Type *Ty) {
// Expand the code for this SCEV.
assert(SE.getTypeSizeInBits(Ty) == SE.getTypeSizeInBits(SH->getType()) &&
"non-trivial casts should be done with the SCEVs directly!");
- InsertPt = IP;
Value *V = expand(SH);
return InsertNoopCastOfTo(V, Ty);
}