[PATCH] D94376: [MemCpyOpt] Enable MemorySSA by default

2021-05-14 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment.

In my premerge testing, I see this fail which looks like the check string is 
incorrect:

  command stderr:
  
C:\ws\w16e2-2\llvm-project\premerge-checks\llvm\test\Other\new-pm-lto-defaults.ll:84:21:
 error: CHECK-O23SZ-NEXT: expected string not found in input
  
  ; CHECK-O23SZ-NEXT: Running pass: InvalidateAnalysisPass on 
foo
  
  ^
  
  :49:40: note: scanning from here
  
  Running analysis: GlobalsAA on [module]
  
 ^
  
  :50:1: note: possible intended match here
  
  Running pass: InvalidateAnalysisPass on foo
  
  https://reviews.llvm.org/harbormaster/unit/view/743692/ for D101640


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94376/new/

https://reviews.llvm.org/D94376

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D94376: [MemCpyOpt] Enable MemorySSA by default

2021-02-22 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment.

In D94376#2579242 , @nikic wrote:

> @uabelho Thanks for the report! This issue should be resolved by 
> https://github.com/llvm/llvm-project/commit/4125afc35723b490556f7a38f7835f0914f70292.

Yep, thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94376/new/

https://reviews.llvm.org/D94376

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D94376: [MemCpyOpt] Enable MemorySSA by default

2021-02-22 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment.

@uabelho Thanks for the report! This issue should be resolved by 
https://github.com/llvm/llvm-project/commit/4125afc35723b490556f7a38f7835f0914f70292.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94376/new/

https://reviews.llvm.org/D94376

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D94376: [MemCpyOpt] Enable MemorySSA by default

2021-02-22 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment.

I ran into a crash in memcpyopt with this patch.
Running

  opt -S -o - bbi-53212.ll -memcpyopt

yields

  opt: ../include/llvm/Support/Casting.h:104: static bool 
llvm::isa_impl_cl::doit(const 
From *) [To = llvm::MemoryUse, From = const llvm::MemoryUseOrDef *]: Assertion 
`Val && "isa<> used on a null pointer"' failed.
  PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash 
backtrace.
  Stack dump:
  0.Program arguments: /data/repo/master/llvm/build-all/bin/opt -S -o - 
bbi-53212.ll -memcpyopt
   #0 0x029461e3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) 
(/data/repo/master/llvm/build-all/bin/opt+0x29461e3)
   #1 0x02943e9e llvm::sys::RunSignalHandlers() 
(/data/repo/master/llvm/build-all/bin/opt+0x2943e9e)
   #2 0x029466a6 SignalHandler(int) Signals.cpp:0:0
   #3 0x7ff087446980 __restore_rt 
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
   #4 0x7ff084517fb7 raise 
/build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
   #5 0x7ff084519921 abort 
/build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
   #6 0x7ff08450948a __assert_fail_base 
/build/glibc-S9d2JN/glibc-2.27/assert/assert.c:89:0
   #7 0x7ff084509502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
   #8 0x019f8722 llvm::MemoryUseOrDef::getDefiningAccess() const 
(/data/repo/master/llvm/build-all/bin/opt+0x19f8722)
   #9 0x02766c6d 
llvm::MemCpyOptPass::processByValArgument(llvm::CallBase&, unsigned int) 
(/data/repo/master/llvm/build-all/bin/opt+0x2766c6d)
  #10 0x02767810 
llvm::MemCpyOptPass::iterateOnFunction(llvm::Function&) 
(/data/repo/master/llvm/build-all/bin/opt+0x2767810)
  #11 0x02768280 llvm::MemCpyOptPass::runImpl(llvm::Function&, 
llvm::MemoryDependenceResults*, llvm::TargetLibraryInfo*, llvm::AAResults*, 
llvm::AssumptionCache*, llvm::DominatorTree*, llvm::MemorySSA*) 
(/data/repo/master/llvm/build-all/bin/opt+0x2768280)
  #12 0x02767c69 llvm::MemCpyOptPass::run(llvm::Function&, 
llvm::AnalysisManager&) 
(/data/repo/master/llvm/build-all/bin/opt+0x2767c69)
  #13 0x02bf031d llvm::detail::PassModel >::run(llvm::Function&, 
llvm::AnalysisManager&) 
(/data/repo/master/llvm/build-all/bin/opt+0x2bf031d)
  #14 0x021720c9 llvm::PassManager >::run(llvm::Function&, 
llvm::AnalysisManager&) 
(/data/repo/master/llvm/build-all/bin/opt+0x21720c9)
  #15 0x00a7cbfd llvm::detail::PassModel >, 
llvm::PreservedAnalyses, llvm::AnalysisManager 
>::run(llvm::Function&, llvm::AnalysisManager&) 
(/data/repo/master/llvm/build-all/bin/opt+0xa7cbfd)
  #16 0x021768b6 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, 
llvm::AnalysisManager&) 
(/data/repo/master/llvm/build-all/bin/opt+0x21768b6)
  #17 0x0076c61d llvm::detail::PassModel >::run(llvm::Module&, 
llvm::AnalysisManager&) 
(/data/repo/master/llvm/build-all/bin/opt+0x76c61d)
  #18 0x02170f2b llvm::PassManager >::run(llvm::Module&, 
llvm::AnalysisManager&) 
(/data/repo/master/llvm/build-all/bin/opt+0x2170f2b)
  #19 0x00764fe1 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, 
llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, 
llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, 
llvm::ArrayRef, llvm::opt_tool::OutputKind, 
llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool) 
(/data/repo/master/llvm/build-all/bin/opt+0x764fe1)
  #20 0x00776b32 main 
(/data/repo/master/llvm/build-all/bin/opt+0x776b32)
  #21 0x7ff0844fabf7 __libc_start_main 
/build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344:0
  #22 0x0075e76a _start 
(/data/repo/master/llvm/build-all/bin/opt+0x75e76a)

F15612676: bbi-53212.ll 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94376/new/

https://reviews.llvm.org/D94376

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D94376: [MemCpyOpt] Enable MemorySSA by default

2021-02-19 Thread Nikita Popov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
nikic marked an inline comment as done.
Closed by commit rG71a8e4e7d6b9: [MemCopyOpt] Enable MemorySSA by default 
(authored by nikic).
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Changed prior to commit:
  https://reviews.llvm.org/D94376?vs=316520=325007#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94376/new/

https://reviews.llvm.org/D94376

Files:
  clang/test/CodeGen/thinlto-distributed-newpm.ll
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
  llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
  llvm/test/Analysis/BasicAA/phi-values-usage.ll
  llvm/test/CodeGen/AMDGPU/opt-pipeline.ll
  llvm/test/Other/new-pm-defaults.ll
  llvm/test/Other/new-pm-lto-defaults.ll
  llvm/test/Other/new-pm-thinlto-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
  llvm/test/Other/opt-LTO-pipeline.ll
  llvm/test/Other/opt-O2-pipeline.ll
  llvm/test/Other/opt-O3-pipeline-enable-matrix.ll
  llvm/test/Other/opt-O3-pipeline.ll
  llvm/test/Other/opt-Os-pipeline.ll

Index: llvm/test/Other/opt-Os-pipeline.ll
===
--- llvm/test/Other/opt-Os-pipeline.ll
+++ llvm/test/Other/opt-Os-pipeline.ll
@@ -131,14 +131,10 @@
 ; CHECK-NEXT: Lazy Block Frequency Analysis
 ; CHECK-NEXT: Optimization Remark Emitter
 ; CHECK-NEXT: Global Value Numbering
-; CHECK-NEXT: Phi Values Analysis
-; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
-; CHECK-NEXT: Function Alias Analysis Results
-; CHECK-NEXT: Memory Dependence Analysis
-; CHECK-NEXT: MemCpy Optimization
 ; CHECK-NEXT: Sparse Conditional Constant Propagation
 ; CHECK-NEXT: Demanded bits analysis
 ; CHECK-NEXT: Bit-Tracking Dead Code Elimination
+; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
 ; CHECK-NEXT: Function Alias Analysis Results
 ; CHECK-NEXT: Lazy Branch Probability Analysis
 ; CHECK-NEXT: Lazy Block Frequency Analysis
@@ -152,6 +148,7 @@
 ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
 ; CHECK-NEXT: Function Alias Analysis Results
 ; CHECK-NEXT: Memory SSA
+; CHECK-NEXT: MemCpy Optimization
 ; CHECK-NEXT: Dead Store Elimination
 ; CHECK-NEXT: Natural Loop Information
 ; CHECK-NEXT: Canonicalize natural loops
Index: llvm/test/Other/opt-O3-pipeline.ll
===
--- llvm/test/Other/opt-O3-pipeline.ll
+++ llvm/test/Other/opt-O3-pipeline.ll
@@ -150,14 +150,10 @@
 ; CHECK-NEXT: Lazy Block Frequency Analysis
 ; CHECK-NEXT: Optimization Remark Emitter
 ; CHECK-NEXT: Global Value Numbering
-; CHECK-NEXT: Phi Values Analysis
-; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
-; CHECK-NEXT: Function Alias Analysis Results
-; CHECK-NEXT: Memory Dependence Analysis
-; CHECK-NEXT: MemCpy Optimization
 ; CHECK-NEXT: Sparse Conditional Constant Propagation
 ; CHECK-NEXT: Demanded bits analysis
 ; CHECK-NEXT: Bit-Tracking Dead Code Elimination
+; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
 ; CHECK-NEXT: Function Alias Analysis Results
 ; CHECK-NEXT: Lazy Branch Probability Analysis
 ; CHECK-NEXT: Lazy Block Frequency Analysis
@@ -171,6 +167,7 @@
 ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
 ; CHECK-NEXT: Function Alias Analysis Results
 ; CHECK-NEXT: Memory SSA
+; CHECK-NEXT: MemCpy Optimization
 ; CHECK-NEXT: Dead Store Elimination
 ; CHECK-NEXT: Natural Loop Information
 ; CHECK-NEXT: Canonicalize natural loops
Index: llvm/test/Other/opt-O3-pipeline-enable-matrix.ll
===
--- llvm/test/Other/opt-O3-pipeline-enable-matrix.ll
+++ llvm/test/Other/opt-O3-pipeline-enable-matrix.ll
@@ -150,14 +150,10 @@
 ; CHECK-NEXT: Lazy Block Frequency Analysis
 ; CHECK-NEXT: Optimization Remark Emitter
 ; CHECK-NEXT: Global Value Numbering
-; CHECK-NEXT: Phi Values Analysis
-; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
-; CHECK-NEXT: Function Alias Analysis Results
-; CHECK-NEXT: Memory Dependence Analysis
-; CHECK-NEXT: MemCpy Optimization
 ; CHECK-NEXT: Sparse Conditional Constant Propagation
 ; CHECK-NEXT: Demanded bits analysis
 ; CHECK-NEXT: Bit-Tracking Dead Code Elimination
+; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
 ; CHECK-NEXT: