diff options
| author | Dan Gohman <gohman@apple.com> | 2009-04-23 15:16:49 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-04-23 15:16:49 +0000 |
| commit | 86bcd97014885a25218434101cdb37d03dcb5912 (patch) | |
| tree | eb3fe89742132f0c52d41e9e609b11be1c29a83e /llvm/lib/Analysis/ScalarEvolutionExpander.cpp | |
| parent | 3c301dc57322696da7818a9c4e042a259092eb43 (diff) | |
| download | bcm5719-llvm-86bcd97014885a25218434101cdb37d03dcb5912.tar.gz bcm5719-llvm-86bcd97014885a25218434101cdb37d03dcb5912.zip | |
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.
llvm-svn: 69892
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolutionExpander.cpp')
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolutionExpander.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp index 80b47d89240..9676ea20af5 100644 --- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/llvm/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); } |

