[llvm] r370957 - [MemorySSA] Re-enable MemorySSA use.

Alina Sbirlea via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 15:23:41 PDT 2019


Fix in: https://reviews.llvm.org/D67470

On Wed, Sep 11, 2019 at 2:41 AM Mikael Holmén <mikael.holmen at ericsson.com>
wrote:

> Hi,
>
> Another crash with memoryssa turned on. I think this one is unrelated
> to the other crashes I've seen since there are no debug intrinsics
> around this time.
>
> opt -S -o - f4.ll -loop-unswitch -disable-basicaa
>
> gives
>
> opt: ../lib/Analysis/MemorySSA.cpp:1976: void
> llvm::MemorySSA::verifyOrdering(llvm::Function &) const: Assertion
> `(!MA || (AL && (isa<MemoryUse>(MA) || DL))) && "We have memory
> affecting instructions " "in this block but they are not in the "
> "access list or defs list"' failed.
>
> Regards,
> Mikael
>
> On Wed, 2019-09-04 at 19:16 +0000, Alina Sbirlea via llvm-commits
> wrote:
> > Author: asbirlea
> > Date: Wed Sep  4 12:16:04 2019
> > New Revision: 370957
> >
> > URL:
> >
> https://protect2.fireeye.com/url?k=118d60b4-4d07aa6a-118d202f-86823e270a62-c84f23bab7bb3f2b&q=1&u=http%3A%2F%2Fllvm.org%2Fviewvc%2Fllvm-project%3Frev%3D370957%26view%3Drev
> > Log:
> > [MemorySSA] Re-enable MemorySSA use.
> >
> > Differential Revision:
> >
> https://protect2.fireeye.com/url?k=61626bbe-3de8a160-61622b25-86823e270a62-8eda56b83091d815&q=1&u=https%3A%2F%2Freviews.llvm.org%2FD58311
> >
> > Modified:
> >     llvm/trunk/lib/Analysis/MemorySSA.cpp
> >     llvm/trunk/lib/Transforms/Utils/LoopUtils.cpp
> >     llvm/trunk/test/CodeGen/PowerPC/sms-grp-order.ll
> >     llvm/trunk/test/Other/opt-O2-pipeline.ll
> >     llvm/trunk/test/Other/opt-O3-pipeline.ll
> >     llvm/trunk/test/Other/opt-Os-pipeline.ll
> >
> > Modified: llvm/trunk/lib/Analysis/MemorySSA.cpp
> > URL:
> >
> https://protect2.fireeye.com/url?k=4d59b454-11d37e8a-4d59f4cf-86823e270a62-7a9a9b9527ff7f99&q=1&u=http%3A%2F%2Fllvm.org%2Fviewvc%2Fllvm-project%2Fllvm%2Ftrunk%2Flib%2FAnalysis%2FMemorySSA.cpp%3Frev%3D370957%26r1%3D370956%26r2%3D370957%26view%3Ddiff
> > =====================================================================
> > =========
> > --- llvm/trunk/lib/Analysis/MemorySSA.cpp (original)
> > +++ llvm/trunk/lib/Analysis/MemorySSA.cpp Wed Sep  4 12:16:04 2019
> > @@ -84,7 +84,7 @@ bool llvm::VerifyMemorySSA = false;
> >  #endif
> >  /// Enables memory ssa as a dependency for loop passes in legacy
> > pass manager.
> >  cl::opt<bool> llvm::EnableMSSALoopDependency(
> > -    "enable-mssa-loop-dependency", cl::Hidden, cl::init(false),
> > +    "enable-mssa-loop-dependency", cl::Hidden, cl::init(true),
> >      cl::desc("Enable MemorySSA dependency for loop pass manager"));
> >
> >  static cl::opt<bool, true>
> >
> > Modified: llvm/trunk/lib/Transforms/Utils/LoopUtils.cpp
> > URL:
> >
> https://protect2.fireeye.com/url?k=82f40532-de7ecfec-82f445a9-86823e270a62-31d7364f85f60f93&q=1&u=http%3A%2F%2Fllvm.org%2Fviewvc%2Fllvm-project%2Fllvm%2Ftrunk%2Flib%2FTransforms%2FUtils%2FLoopUtils.cpp%3Frev%3D370957%26r1%3D370956%26r2%3D370957%26view%3Ddiff
> > =====================================================================
> > =========
> > --- llvm/trunk/lib/Transforms/Utils/LoopUtils.cpp (original)
> > +++ llvm/trunk/lib/Transforms/Utils/LoopUtils.cpp Wed Sep  4 12:16:04
> > 2019
> > @@ -19,6 +19,7 @@
> >  #include "llvm/Analysis/InstructionSimplify.h"
> >  #include "llvm/Analysis/LoopInfo.h"
> >  #include "llvm/Analysis/LoopPass.h"
> > +#include "llvm/Analysis/MemorySSA.h"
> >  #include "llvm/Analysis/MemorySSAUpdater.h"
> >  #include "llvm/Analysis/MustExecute.h"
> >  #include "llvm/Analysis/ScalarEvolution.h"
> > @@ -170,6 +171,8 @@ void llvm::getLoopAnalysisUsage(Analysis
> >    AU.addPreserved<SCEVAAWrapperPass>();
> >    AU.addRequired<ScalarEvolutionWrapperPass>();
> >    AU.addPreserved<ScalarEvolutionWrapperPass>();
> > +  // FIXME: When all loop passes preserve MemorySSA, it can be
> > required and
> > +  // preserved here instead of the individual handling in each pass.
> >  }
> >
> >  /// Manually defined generic "LoopPass" dependency initialization.
> > This is used
> > @@ -190,6 +193,7 @@ void llvm::initializeLoopPassPass(PassRe
> >    INITIALIZE_PASS_DEPENDENCY(GlobalsAAWrapperPass)
> >    INITIALIZE_PASS_DEPENDENCY(SCEVAAWrapperPass)
> >    INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass)
> > +  INITIALIZE_PASS_DEPENDENCY(MemorySSAWrapperPass)
> >  }
> >
> >  /// Create MDNode for input string.
> >
> > Modified: llvm/trunk/test/CodeGen/PowerPC/sms-grp-order.ll
> > URL:
> >
> https://protect2.fireeye.com/url?k=0057ee6d-5cdd24b3-0057aef6-86823e270a62-8405017b45a891b5&q=1&u=http%3A%2F%2Fllvm.org%2Fviewvc%2Fllvm-project%2Fllvm%2Ftrunk%2Ftest%2FCodeGen%2FPowerPC%2Fsms-grp-order.ll%3Frev%3D370957%26r1%3D370956%26r2%3D370957%26view%3Ddiff
> > =====================================================================
> > =========
> > --- llvm/trunk/test/CodeGen/PowerPC/sms-grp-order.ll (original)
> > +++ llvm/trunk/test/CodeGen/PowerPC/sms-grp-order.ll Wed Sep  4
> > 12:16:04 2019
> > @@ -4,25 +4,24 @@
> >
> >  define void @lame_encode_buffer_interleaved() local_unnamed_addr {
> >  ; CHECK-LABEL: lame_encode_buffer_interleaved:
> > -; CHECK:       # %bb.0:
> > -; CHECK-NEXT:    lhz 3, 0(0)
> > -; CHECK-NEXT:    li 5, 1
> > -; CHECK-NEXT:    sldi 5, 5, 62
> > -; CHECK-NEXT:    lhz 4, 0(3)
> > -; CHECK-NEXT:    mtctr 5
> > -; CHECK-NEXT:    .p2align 5
> > -; CHECK-NEXT:  .LBB0_1: #
> > -; CHECK-NEXT:    extsh 3, 3
> > -; CHECK-NEXT:    extsh 4, 4
> > -; CHECK-NEXT:    srawi 3, 3, 1
> > -; CHECK-NEXT:    addze 3, 3
> > -; CHECK-NEXT:    srawi 4, 4, 1
> > -; CHECK-NEXT:    addze 4, 4
> > -; CHECK-NEXT:    bdnz .LBB0_1
> > -; CHECK-NEXT:  # %bb.2:
> > -; CHECK-NEXT:    sth 3, 0(0)
> > -; CHECK-NEXT:    sth 4, 0(3)
> > -; CHECK-NEXT:    blr
> > +; CHECK:      # %bb.0:
> > +; CHECK-NEXT:   lha 3, 0(3)
> > +; CHECK-NEXT:   li 5, 1
> > +; CHECK-NEXT:   sldi 5, 5, 62
> > +; CHECK-NEXT:   lhz 4, 0(0)
> > +; CHECK-NEXT:   mtctr 5
> > +; CHECK-NEXT:   srawi 3, 3, 1
> > +; CHECK-NEXT:   addze 3, 3
> > +; CHECK-NEXT:   .p2align 4
> > +; CHECK-NEXT: .LBB0_1:
> > +; CHECK-NEXT:   extsh 4, 4
> > +; CHECK-NEXT:   srawi 4, 4, 1
> > +; CHECK-NEXT:   addze 4, 4
> > +; CHECK-NEXT:   bdnz .LBB0_1
> > +; CHECK-NEXT: # %bb.2:
> > +; CHECK-NEXT:   sth 4, 0(0)
> > +; CHECK-NEXT:   sth 3, 0(3)
> > +; CHECK-NEXT:   blr
> >    br label %1
> >
> >  1:                                                ; preds = %1, %0
> >
> > Modified: llvm/trunk/test/Other/opt-O2-pipeline.ll
> > URL:
> >
> https://protect2.fireeye.com/url?k=9b0187ad-c78b4d73-9b01c736-86823e270a62-3cdb18bf2d8c50f7&q=1&u=http%3A%2F%2Fllvm.org%2Fviewvc%2Fllvm-project%2Fllvm%2Ftrunk%2Ftest%2FOther%2Fopt-O2-pipeline.ll%3Frev%3D370957%26r1%3D370956%26r2%3D370957%26view%3Ddiff
> > =====================================================================
> > =========
> > --- llvm/trunk/test/Other/opt-O2-pipeline.ll (original)
> > +++ llvm/trunk/test/Other/opt-O2-pipeline.ll Wed Sep  4 12:16:04 2019
> > @@ -93,12 +93,13 @@
> >  ; CHECK-NEXT:         Simplify the CFG
> >  ; CHECK-NEXT:         Reassociate expressions
> >  ; CHECK-NEXT:         Dominator Tree Construction
> > +; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)
> > +; CHECK-NEXT:         Function Alias Analysis Results
> > +; CHECK-NEXT:         Memory SSA
> >  ; CHECK-NEXT:         Natural Loop Information
> >  ; CHECK-NEXT:         Canonicalize natural loops
> >  ; CHECK-NEXT:         LCSSA Verifier
> >  ; CHECK-NEXT:         Loop-Closed SSA Form Pass
> > -; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)
> > -; CHECK-NEXT:         Function Alias Analysis Results
> >  ; CHECK-NEXT:         Scalar Evolution Analysis
> >  ; CHECK-NEXT:         Loop Pass Manager
> >  ; CHECK-NEXT:           Rotate Loops
> > @@ -153,12 +154,13 @@
> >  ; CHECK-NEXT:         Phi Values Analysis
> >  ; CHECK-NEXT:         Memory Dependence Analysis
> >  ; CHECK-NEXT:         Dead Store Elimination
> > +; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)
> > +; CHECK-NEXT:         Function Alias Analysis Results
> > +; CHECK-NEXT:         Memory SSA
> >  ; CHECK-NEXT:         Natural Loop Information
> >  ; CHECK-NEXT:         Canonicalize natural loops
> >  ; CHECK-NEXT:         LCSSA Verifier
> >  ; CHECK-NEXT:         Loop-Closed SSA Form Pass
> > -; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)
> > -; CHECK-NEXT:         Function Alias Analysis Results
> >  ; CHECK-NEXT:         Scalar Evolution Analysis
> >  ; CHECK-NEXT:         Loop Pass Manager
> >  ; CHECK-NEXT:           Loop Invariant Code Motion
> > @@ -185,12 +187,13 @@
> >  ; CHECK-NEXT:     FunctionPass Manager
> >  ; CHECK-NEXT:       Float to int
> >  ; CHECK-NEXT:       Dominator Tree Construction
> > +; CHECK-NEXT:       Basic Alias Analysis (stateless AA impl)
> > +; CHECK-NEXT:       Function Alias Analysis Results
> > +; CHECK-NEXT:       Memory SSA
> >  ; CHECK-NEXT:       Natural Loop Information
> >  ; CHECK-NEXT:       Canonicalize natural loops
> >  ; CHECK-NEXT:       LCSSA Verifier
> >  ; CHECK-NEXT:       Loop-Closed SSA Form Pass
> > -; CHECK-NEXT:       Basic Alias Analysis (stateless AA impl)
> > -; CHECK-NEXT:       Function Alias Analysis Results
> >  ; CHECK-NEXT:       Scalar Evolution Analysis
> >  ; CHECK-NEXT:       Loop Pass Manager
> >  ; CHECK-NEXT:         Rotate Loops
> > @@ -246,6 +249,7 @@
> >  ; CHECK-NEXT:       Lazy Block Frequency Analysis
> >  ; CHECK-NEXT:       Optimization Remark Emitter
> >  ; CHECK-NEXT:       Combine redundant instructions
> > +; CHECK-NEXT:       Memory SSA
> >  ; CHECK-NEXT:       Canonicalize natural loops
> >  ; CHECK-NEXT:       LCSSA Verifier
> >  ; CHECK-NEXT:       Loop-Closed SSA Form Pass
> >
> > Modified: llvm/trunk/test/Other/opt-O3-pipeline.ll
> > URL:
> >
> https://protect2.fireeye.com/url?k=394f545b-65c59e85-394f14c0-86823e270a62-0bf04c74db73c9df&q=1&u=http%3A%2F%2Fllvm.org%2Fviewvc%2Fllvm-project%2Fllvm%2Ftrunk%2Ftest%2FOther%2Fopt-O3-pipeline.ll%3Frev%3D370957%26r1%3D370956%26r2%3D370957%26view%3Ddiff
> > =====================================================================
> > =========
> > --- llvm/trunk/test/Other/opt-O3-pipeline.ll (original)
> > +++ llvm/trunk/test/Other/opt-O3-pipeline.ll Wed Sep  4 12:16:04 2019
> > @@ -98,12 +98,13 @@
> >  ; CHECK-NEXT:         Simplify the CFG
> >  ; CHECK-NEXT:         Reassociate expressions
> >  ; CHECK-NEXT:         Dominator Tree Construction
> > +; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)
> > +; CHECK-NEXT:         Function Alias Analysis Results
> > +; CHECK-NEXT:         Memory SSA
> >  ; CHECK-NEXT:         Natural Loop Information
> >  ; CHECK-NEXT:         Canonicalize natural loops
> >  ; CHECK-NEXT:         LCSSA Verifier
> >  ; CHECK-NEXT:         Loop-Closed SSA Form Pass
> > -; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)
> > -; CHECK-NEXT:         Function Alias Analysis Results
> >  ; CHECK-NEXT:         Scalar Evolution Analysis
> >  ; CHECK-NEXT:         Loop Pass Manager
> >  ; CHECK-NEXT:           Rotate Loops
> > @@ -158,12 +159,13 @@
> >  ; CHECK-NEXT:         Phi Values Analysis
> >  ; CHECK-NEXT:         Memory Dependence Analysis
> >  ; CHECK-NEXT:         Dead Store Elimination
> > +; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)
> > +; CHECK-NEXT:         Function Alias Analysis Results
> > +; CHECK-NEXT:         Memory SSA
> >  ; CHECK-NEXT:         Natural Loop Information
> >  ; CHECK-NEXT:         Canonicalize natural loops
> >  ; CHECK-NEXT:         LCSSA Verifier
> >  ; CHECK-NEXT:         Loop-Closed SSA Form Pass
> > -; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)
> > -; CHECK-NEXT:         Function Alias Analysis Results
> >  ; CHECK-NEXT:         Scalar Evolution Analysis
> >  ; CHECK-NEXT:         Loop Pass Manager
> >  ; CHECK-NEXT:           Loop Invariant Code Motion
> > @@ -190,12 +192,13 @@
> >  ; CHECK-NEXT:     FunctionPass Manager
> >  ; CHECK-NEXT:       Float to int
> >  ; CHECK-NEXT:       Dominator Tree Construction
> > +; CHECK-NEXT:       Basic Alias Analysis (stateless AA impl)
> > +; CHECK-NEXT:       Function Alias Analysis Results
> > +; CHECK-NEXT:       Memory SSA
> >  ; CHECK-NEXT:       Natural Loop Information
> >  ; CHECK-NEXT:       Canonicalize natural loops
> >  ; CHECK-NEXT:       LCSSA Verifier
> >  ; CHECK-NEXT:       Loop-Closed SSA Form Pass
> > -; CHECK-NEXT:       Basic Alias Analysis (stateless AA impl)
> > -; CHECK-NEXT:       Function Alias Analysis Results
> >  ; CHECK-NEXT:       Scalar Evolution Analysis
> >  ; CHECK-NEXT:       Loop Pass Manager
> >  ; CHECK-NEXT:         Rotate Loops
> > @@ -251,6 +254,7 @@
> >  ; CHECK-NEXT:       Lazy Block Frequency Analysis
> >  ; CHECK-NEXT:       Optimization Remark Emitter
> >  ; CHECK-NEXT:       Combine redundant instructions
> > +; CHECK-NEXT:       Memory SSA
> >  ; CHECK-NEXT:       Canonicalize natural loops
> >  ; CHECK-NEXT:       LCSSA Verifier
> >  ; CHECK-NEXT:       Loop-Closed SSA Form Pass
> >
> > Modified: llvm/trunk/test/Other/opt-Os-pipeline.ll
> > URL:
> >
> https://protect2.fireeye.com/url?k=01c3e0a1-5d492a7f-01c3a03a-86823e270a62-da433cbe7321f7ab&q=1&u=http%3A%2F%2Fllvm.org%2Fviewvc%2Fllvm-project%2Fllvm%2Ftrunk%2Ftest%2FOther%2Fopt-Os-pipeline.ll%3Frev%3D370957%26r1%3D370956%26r2%3D370957%26view%3Ddiff
> > =====================================================================
> > =========
> > --- llvm/trunk/test/Other/opt-Os-pipeline.ll (original)
> > +++ llvm/trunk/test/Other/opt-Os-pipeline.ll Wed Sep  4 12:16:04 2019
> > @@ -80,12 +80,13 @@
> >  ; CHECK-NEXT:         Simplify the CFG
> >  ; CHECK-NEXT:         Reassociate expressions
> >  ; CHECK-NEXT:         Dominator Tree Construction
> > +; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)
> > +; CHECK-NEXT:         Function Alias Analysis Results
> > +; CHECK-NEXT:         Memory SSA
> >  ; CHECK-NEXT:         Natural Loop Information
> >  ; CHECK-NEXT:         Canonicalize natural loops
> >  ; CHECK-NEXT:         LCSSA Verifier
> >  ; CHECK-NEXT:         Loop-Closed SSA Form Pass
> > -; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)
> > -; CHECK-NEXT:         Function Alias Analysis Results
> >  ; CHECK-NEXT:         Scalar Evolution Analysis
> >  ; CHECK-NEXT:         Loop Pass Manager
> >  ; CHECK-NEXT:           Rotate Loops
> > @@ -140,12 +141,13 @@
> >  ; CHECK-NEXT:         Phi Values Analysis
> >  ; CHECK-NEXT:         Memory Dependence Analysis
> >  ; CHECK-NEXT:         Dead Store Elimination
> > +; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)
> > +; CHECK-NEXT:         Function Alias Analysis Results
> > +; CHECK-NEXT:         Memory SSA
> >  ; CHECK-NEXT:         Natural Loop Information
> >  ; CHECK-NEXT:         Canonicalize natural loops
> >  ; CHECK-NEXT:         LCSSA Verifier
> >  ; CHECK-NEXT:         Loop-Closed SSA Form Pass
> > -; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)
> > -; CHECK-NEXT:         Function Alias Analysis Results
> >  ; CHECK-NEXT:         Scalar Evolution Analysis
> >  ; CHECK-NEXT:         Loop Pass Manager
> >  ; CHECK-NEXT:           Loop Invariant Code Motion
> > @@ -172,12 +174,13 @@
> >  ; CHECK-NEXT:     FunctionPass Manager
> >  ; CHECK-NEXT:       Float to int
> >  ; CHECK-NEXT:       Dominator Tree Construction
> > +; CHECK-NEXT:       Basic Alias Analysis (stateless AA impl)
> > +; CHECK-NEXT:       Function Alias Analysis Results
> > +; CHECK-NEXT:       Memory SSA
> >  ; CHECK-NEXT:       Natural Loop Information
> >  ; CHECK-NEXT:       Canonicalize natural loops
> >  ; CHECK-NEXT:       LCSSA Verifier
> >  ; CHECK-NEXT:       Loop-Closed SSA Form Pass
> > -; CHECK-NEXT:       Basic Alias Analysis (stateless AA impl)
> > -; CHECK-NEXT:       Function Alias Analysis Results
> >  ; CHECK-NEXT:       Scalar Evolution Analysis
> >  ; CHECK-NEXT:       Loop Pass Manager
> >  ; CHECK-NEXT:         Rotate Loops
> > @@ -233,6 +236,7 @@
> >  ; CHECK-NEXT:       Lazy Block Frequency Analysis
> >  ; CHECK-NEXT:       Optimization Remark Emitter
> >  ; CHECK-NEXT:       Combine redundant instructions
> > +; CHECK-NEXT:       Memory SSA
> >  ; CHECK-NEXT:       Canonicalize natural loops
> >  ; CHECK-NEXT:       LCSSA Verifier
> >  ; CHECK-NEXT:       Loop-Closed SSA Form Pass
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> >
>
> https://protect2.fireeye.com/url?k=613081b5-3dba4b6b-6130c12e-86823e270a62-3b9ac07604e9c962&q=1&u=https%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190911/bfba1788/attachment.html>


More information about the llvm-commits mailing list