From: Andrew Trick Date: Wed, 6 Jul 2011 21:07:10 +0000 (+0000) Subject: indvars -disable-iv-rewrite: ExprToMap lives in Pass data, so be more X-Git-Tag: android-x86-6.0-r1~944^2~355 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=17f91d21a764603b9c482338e929390565f3bb72;p=android-x86%2Fexternal-llvm.git 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 --- diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 477f42c50e0..31dbd42f2c0 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -81,7 +81,7 @@ static cl::opt DisableIVRewrite( namespace { class IndVarSimplify : public LoopPass { - typedef DenseMap ExprToIVMapTy; + typedef DenseMap< const SCEV *, AssertingVH > 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.