[llvm] 61ac58e - [NewPM] Pin tests with -debug-pass to legacy PM

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 18:06:36 PDT 2020


Author: Arthur Eubanks
Date: 2020-09-22T17:54:25-07:00
New Revision: 61ac58e10ae1fbb18416cac20119725803b9ad6f

URL: https://github.com/llvm/llvm-project/commit/61ac58e10ae1fbb18416cac20119725803b9ad6f
DIFF: https://github.com/llvm/llvm-project/commit/61ac58e10ae1fbb18416cac20119725803b9ad6f.diff

LOG: [NewPM] Pin tests with -debug-pass to legacy PM

-debug-pass is a legacy PM only option.

Some tests checks that the pass returned that it made a change,
which is not relevant to the NPM, since passes return PreservedAnalyses.

Some tests check that passes are freed at the proper time, which is also
not relevant to the NPM.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D87945

Added: 
    

Modified: 
    llvm/test/Analysis/BasicAA/phi-values-usage.ll
    llvm/test/Analysis/alias-analysis-uses.ll
    llvm/test/Transforms/Coroutines/smoketest.ll
    llvm/test/Transforms/GVN/preserve-analysis.ll
    llvm/test/Transforms/InstCombine/early_constfold_changes_IR.ll
    llvm/test/Transforms/InstSimplify/remove-dead-call.ll
    llvm/test/Transforms/SCCP/preserve-analysis.ll
    llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Analysis/BasicAA/phi-values-usage.ll b/llvm/test/Analysis/BasicAA/phi-values-usage.ll
index ec71eacc093c..484825fbc005 100644
--- a/llvm/test/Analysis/BasicAA/phi-values-usage.ll
+++ b/llvm/test/Analysis/BasicAA/phi-values-usage.ll
@@ -1,5 +1,6 @@
-; RUN: opt -debug-pass=Executions -phi-values -memcpyopt -instcombine -disable-output < %s 2>&1 | FileCheck %s -check-prefixes=CHECK,CHECK-MEMCPY
-; RUN: opt -debug-pass=Executions -memdep -instcombine -disable-output < %s 2>&1 | FileCheck %s -check-prefix=CHECK
+; RUN: opt -debug-pass=Executions -phi-values -memcpyopt -instcombine -disable-output < %s -enable-new-pm=0 2>&1 | FileCheck %s -check-prefixes=CHECK,CHECK-MEMCPY
+; RUN: opt -debug-pass=Executions -memdep -instcombine -disable-output < %s -enable-new-pm=0 2>&1 | FileCheck %s -check-prefix=CHECK
+; RUN: opt -debug-pass-manager -aa-pipeline=basic-aa -passes=memcpyopt,instcombine -disable-output < %s 2>&1 | FileCheck %s -check-prefixes=NPM,NPM-MEMCPY
 
 ; Check that phi values is not run when it's not already available, and that
 ; basicaa is not freed after a pass that preserves CFG, as it preserves CFG.
@@ -15,6 +16,13 @@
 ; CHECK-NOT: Executing Pass 'Basic Alias Analysis (stateless AA impl)'
 ; CHECK: Executing Pass 'Combine redundant instructions'
 
+; NPM-DAG: Running analysis: PhiValuesAnalysis
+; NPM-DAG: Running analysis: BasicAA
+; NPM-DAG: Running analysis: MemoryDependenceAnalysis
+; NPM: Running pass: MemCpyOptPass
+; NPM-NOT: Invalidating analysis
+; NPM: Running pass: InstCombinePass
+
 target datalayout = "p:8:8-n8"
 
 declare void @otherfn([4 x i8]*)

diff  --git a/llvm/test/Analysis/alias-analysis-uses.ll b/llvm/test/Analysis/alias-analysis-uses.ll
index 8f13148b2011..715d5c6c557c 100644
--- a/llvm/test/Analysis/alias-analysis-uses.ll
+++ b/llvm/test/Analysis/alias-analysis-uses.ll
@@ -1,4 +1,4 @@
-; RUN: opt -debug-pass=Executions -globals-aa -function-attrs -disable-output < %s 2>&1 | FileCheck %s
+; RUN: opt -debug-pass=Executions -globals-aa -function-attrs -disable-output < %s -enable-new-pm=0 2>&1 | FileCheck %s
 
 ; CHECK: Executing Pass 'Globals Alias Analysis'
 ; CHECK-NOT: Freeing Pass 'Globals Alias Analysis'

diff  --git a/llvm/test/Transforms/Coroutines/smoketest.ll b/llvm/test/Transforms/Coroutines/smoketest.ll
index 020459f2a5ae..b2ae125458ad 100644
--- a/llvm/test/Transforms/Coroutines/smoketest.ll
+++ b/llvm/test/Transforms/Coroutines/smoketest.ll
@@ -2,13 +2,13 @@
 ; levels and -enable-coroutines adds coroutine passes to the pipeline.
 ;
 ; Legacy pass manager:
-; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments -O0 2>&1 | FileCheck %s
-; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments -O1 2>&1 | FileCheck %s
-; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments -O2 2>&1 | FileCheck %s
-; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments -O3 2>&1 | FileCheck %s
+; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments -O0 -enable-new-pm=0 2>&1 | FileCheck %s
+; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments -O1 -enable-new-pm=0 2>&1 | FileCheck %s
+; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments -O2 -enable-new-pm=0 2>&1 | FileCheck %s
+; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments -O3 -enable-new-pm=0 2>&1 | FileCheck %s
 ; RUN: opt < %s -disable-output -enable-coroutines -debug-pass=Arguments \
-; RUN:     -coro-early -coro-split -coro-elide -coro-cleanup 2>&1 | FileCheck %s
-; RUN: opt < %s -disable-output -debug-pass=Arguments 2>&1 \
+; RUN:     -coro-early -coro-split -coro-elide -coro-cleanup -enable-new-pm=0 2>&1 | FileCheck %s
+; RUN: opt < %s -disable-output -debug-pass=Arguments -enable-new-pm=0 2>&1 \
 ; RUN:     | FileCheck %s -check-prefix=NOCORO
 ; New pass manager:
 ; RUN: opt < %s -disable-output -passes='default<O0>' -enable-coroutines \

diff  --git a/llvm/test/Transforms/GVN/preserve-analysis.ll b/llvm/test/Transforms/GVN/preserve-analysis.ll
index 22cc966479f8..4f2c206c70c7 100644
--- a/llvm/test/Transforms/GVN/preserve-analysis.ll
+++ b/llvm/test/Transforms/GVN/preserve-analysis.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -debug-pass=Structure -indvars -gvn -indvars 2>&1 -S | FileCheck --check-prefix=CHECK --check-prefix=IR %s
+; RUN: opt < %s -debug-pass=Structure -indvars -gvn -indvars -enable-new-pm=0 2>&1 -S | FileCheck --check-prefix=CHECK --check-prefix=IR %s
 ; RUN: opt < %s -debug-pass-manager -passes='require<domtree>,loop(loop-simplifycfg),gvn,loop(indvars)' 2>&1 -S | FileCheck --check-prefix=NEW-PM --check-prefix=IR %s
 
 ; Check CFG-only analysis are preserved by SCCP by running it between 2

diff  --git a/llvm/test/Transforms/InstCombine/early_constfold_changes_IR.ll b/llvm/test/Transforms/InstCombine/early_constfold_changes_IR.ll
index 18b219234801..76fe2050605f 100644
--- a/llvm/test/Transforms/InstCombine/early_constfold_changes_IR.ll
+++ b/llvm/test/Transforms/InstCombine/early_constfold_changes_IR.ll
@@ -3,7 +3,7 @@
 
 ; This run line verifies that InstructionCombiningPass::runOnFunction reports
 ; this as a modification of the IR.
-; RUN: opt < %s -instcombine -disable-output -debug-pass=Details 2>&1 | FileCheck %s --check-prefix=DETAILS
+; RUN: opt < %s -instcombine -disable-output -debug-pass=Details -enable-new-pm=0 2>&1 | FileCheck %s --check-prefix=DETAILS
 
 define i32 @foo(i32 %arg) #0 {
 ; CHECK-LABEL: @foo(

diff  --git a/llvm/test/Transforms/InstSimplify/remove-dead-call.ll b/llvm/test/Transforms/InstSimplify/remove-dead-call.ll
index 172a99131152..2b149f51c456 100755
--- a/llvm/test/Transforms/InstSimplify/remove-dead-call.ll
+++ b/llvm/test/Transforms/InstSimplify/remove-dead-call.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instsimplify -S -o /dev/null -debug-pass=Details 2>&1 | FileCheck --check-prefix DETAILS %s
+; RUN: opt < %s -instsimplify -S -o /dev/null -debug-pass=Details -enable-new-pm=0 2>&1 | FileCheck --check-prefix DETAILS %s
 ; RUN: opt < %s -instsimplify -S -o - | FileCheck %s
 
 ; Verify that InstSimplifyLegacyPass notifies the pass manager about changes

diff  --git a/llvm/test/Transforms/SCCP/preserve-analysis.ll b/llvm/test/Transforms/SCCP/preserve-analysis.ll
index ab68be771e2a..5226b928f726 100644
--- a/llvm/test/Transforms/SCCP/preserve-analysis.ll
+++ b/llvm/test/Transforms/SCCP/preserve-analysis.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -debug-pass=Structure -globals-aa -loop-vectorize -sccp -loop-vectorize -globals-aa 2>&1 -S | FileCheck %s
+; RUN: opt < %s -debug-pass=Structure -globals-aa -loop-vectorize -sccp -loop-vectorize -globals-aa -enable-new-pm=0 2>&1 -S | FileCheck %s
 ; RUN: opt < %s -debug-pass-manager -passes='loop-vectorize,sccp,loop-vectorize' 2>&1 -S | FileCheck --check-prefix=NEW-PM %s
 
 ; Check CFG-only analysis are preserved by SCCP by running it between 2

diff  --git a/llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll b/llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
index 1a620617f7b3..46760e9d732c 100644
--- a/llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
+++ b/llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -S -simplifycfg -debug-pass=Details 2>&1 | FileCheck %s
+; RUN: opt < %s -S -simplifycfg -debug-pass=Details -enable-new-pm=0 2>&1 | FileCheck %s
 
 ;; Check the report from the pass manager, telling us whether simplifycfg
 ;; reported the "changed" status correctly:


        


More information about the llvm-commits mailing list