aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/IndVarSimplify.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-07-06 21:07:10 +0000
committerAndrew Trick <atrick@apple.com>2011-07-06 21:07:10 +0000
commit17f91d21a764603b9c482338e929390565f3bb72 (patch)
tree9d8bb4e78b9a49911180ea9a0a026cc9839806fd /lib/Transforms/Scalar/IndVarSimplify.cpp
parentd378b323826613f57a973c5eb6373f3fd8b012f0 (diff)
downloadexternal_llvm-17f91d21a764603b9c482338e929390565f3bb72.tar.gz
external_llvm-17f91d21a764603b9c482338e929390565f3bb72.tar.bz2
external_llvm-17f91d21a764603b9c482338e929390565f3bb72.zip
indvars -disable-iv-rewrite: ExprToMap lives in Pass data, so be more
careful about referencing values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134537 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 477f42c50e..31dbd42f2c 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/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.