diff options
author | Andrew Trick <atrick@apple.com> | 2011-07-06 21:07:10 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2011-07-06 21:07:10 +0000 |
commit | 9f8c2853ca16fec0096ce59dcb12f827c20666db (patch) | |
tree | d810b4d36693bd9227b0ab1cddd74ec8fee4979d /llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | |
parent | 134f4587e719bfe511e4781d2fdce6d4f969243b (diff) | |
download | bcm5719-llvm-9f8c2853ca16fec0096ce59dcb12f827c20666db.tar.gz bcm5719-llvm-9f8c2853ca16fec0096ce59dcb12f827c20666db.zip |
indvars -disable-iv-rewrite: ExprToMap lives in Pass data, so be more
careful about referencing values.
llvm-svn: 134537
Diffstat (limited to 'llvm/lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index 477f42c50e0..31dbd42f2c0 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -81,7 +81,7 @@ static cl::opt<bool> DisableIVRewrite( namespace { class IndVarSimplify : public LoopPass { - typedef DenseMap<const SCEV *, PHINode *> ExprToIVMapTy; + typedef DenseMap< const SCEV *, AssertingVH<PHINode> > ExprToIVMapTy; IVUsers *IU; LoopInfo *LI; @@ -1375,6 +1375,7 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { // can be deleted in the loop below, causing the AssertingVH in the cache to // trigger. Rewriter.clear(); + ExprToIVMap.clear(); // Now that we're done iterating through lists, clean up any instructions // which are now dead. |