[llvm] 1df8d7b - [opt] Pin -stats-json & -opt-bisect-limit tests to -enable-new-pm=0

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 23:00:06 PDT 2020


Author: Fangrui Song
Date: 2020-10-28T22:59:53-07:00
New Revision: 1df8d7b4f23da304061bf30b617132f8ba9ab80a

URL: https://github.com/llvm/llvm-project/commit/1df8d7b4f23da304061bf30b617132f8ba9ab80a
DIFF: https://github.com/llvm/llvm-project/commit/1df8d7b4f23da304061bf30b617132f8ba9ab80a.diff

LOG: [opt] Pin -stats-json & -opt-bisect-limit tests to -enable-new-pm=0

-stats-json requires `TimeReagion PassTimer(getPassTimer(...))` in the legacy
PM. The loss of functionality is not critical because we have the similar -time-passes.

Added: 
    

Modified: 
    llvm/test/Other/opt-bisect-legacy-pass-manager.ll
    llvm/test/Other/statistic.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Other/opt-bisect-legacy-pass-manager.ll b/llvm/test/Other/opt-bisect-legacy-pass-manager.ll
index 297f61230c9d..8d966deeccd7 100644
--- a/llvm/test/Other/opt-bisect-legacy-pass-manager.ll
+++ b/llvm/test/Other/opt-bisect-legacy-pass-manager.ll
@@ -16,19 +16,19 @@
 ; skippable passes skipped.
 
 ; REQUIRES: default_triple
-; RUN: opt -O3 -opt-bisect-limit=0 < %s | llc -O3 -opt-bisect-limit=0
+; RUN: opt -O3 -opt-bisect-limit=0 -enable-new-pm=0 < %s | llc -O3 -opt-bisect-limit=0
 
 
 ; Verify that no skippable passes are run with -opt-bisect-limit=0.
 
-; RUN: opt -disable-output -disable-verify -O3 -opt-bisect-limit=0 %s 2>&1 \
+; RUN: opt -disable-output -disable-verify -O3 -opt-bisect-limit=0 %s -enable-new-pm=0 2>&1 \
 ; RUN:     | FileCheck %s --check-prefix=CHECK-SKIP-ALL
 ; CHECK-SKIP-ALL: BISECT: NOT running pass ({{[0-9]+}})
 ; CHECK-SKIP-ALL-NOT: BISECT: running pass ({{[0-9]+}})
 
 
 ; Verify that no passes run at -O0 are skipped
-; RUN: opt -opt-bisect-limit=0 < %s 2>&1 | FileCheck %s --check-prefix=OPTBISECT-O0
+; RUN: opt -opt-bisect-limit=0 < %s 2>&1 -enable-new-pm=0 | FileCheck %s --check-prefix=OPTBISECT-O0
 ; OPTBISECT-O0-NOT: BISECT: NOT running
 
 ; FIXME: There are still some AMDGPU passes being skipped that run at -O0.
@@ -51,18 +51,18 @@
 
 ; Test a module pass.
 
-; RUN: opt -disable-output -disable-verify -deadargelim -opt-bisect-limit=-1 %s \
+; RUN: opt -disable-output -disable-verify -deadargelim -opt-bisect-limit=-1 %s -enable-new-pm=0 \
 ; RUN:     2>&1 | FileCheck %s --check-prefix=CHECK-DEADARG
 ; CHECK-DEADARG: BISECT: running pass ({{[0-9]+}}) Dead Argument Elimination on module
 
-; RUN: opt -disable-output -disable-verify -deadargelim -opt-bisect-limit=0 %s \
+; RUN: opt -disable-output -disable-verify -deadargelim -opt-bisect-limit=0 %s -enable-new-pm=0 \
 ; RUN:     2>&1 | FileCheck %s --check-prefix=CHECK-NOT-DEADARG
 ; CHECK-NOT-DEADARG: BISECT: NOT running pass ({{[0-9]+}}) Dead Argument Elimination on module
 
 
 ; Test an SCC pass.
 
-; RUN: opt -disable-output -disable-verify -inline -opt-bisect-limit=-1 %s \
+; RUN: opt -disable-output -disable-verify -inline -opt-bisect-limit=-1 %s -enable-new-pm=0 \
 ; RUN:     2>&1 | FileCheck %s --check-prefix=CHECK-INLINE
 ; CHECK-INLINE: BISECT: running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (<<null function>>)
 ; CHECK-INLINE: BISECT: running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (g)
@@ -71,7 +71,7 @@
 ; CHECK-INLINE: BISECT: running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (f3)
 ; CHECK-INLINE: BISECT: running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (<<null function>>)
 
-; RUN: opt -disable-output -disable-verify -inline -opt-bisect-limit=0 %s \
+; RUN: opt -disable-output -disable-verify -inline -opt-bisect-limit=0 %s -enable-new-pm=0 \
 ; RUN:     2>&1 | FileCheck %s --check-prefix=CHECK-NOT-INLINE
 ; CHECK-NOT-INLINE: BISECT: NOT running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (<<null function>>)
 ; CHECK-NOT-INLINE: BISECT: NOT running pass ({{[0-9]+}}) Function Integration/Inlining on SCC (g)
@@ -83,13 +83,13 @@
 
 ; Test a function pass.
 
-; RUN: opt -disable-output -disable-verify -early-cse -earlycse-debug-hash -opt-bisect-limit=-1 \
+; RUN: opt -disable-output -disable-verify -early-cse -earlycse-debug-hash -opt-bisect-limit=-1 -enable-new-pm=0 \
 ; RUN:     %s 2>&1 | FileCheck %s --check-prefix=CHECK-EARLY-CSE
 ; CHECK-EARLY-CSE: BISECT: running pass ({{[0-9]+}}) Early CSE on function (f1)
 ; CHECK-EARLY-CSE: BISECT: running pass ({{[0-9]+}}) Early CSE on function (f2)
 ; CHECK-EARLY-CSE: BISECT: running pass ({{[0-9]+}}) Early CSE on function (f3)
 
-; RUN: opt -disable-output -disable-verify -early-cse -earlycse-debug-hash -opt-bisect-limit=0 \
+; RUN: opt -disable-output -disable-verify -early-cse -earlycse-debug-hash -opt-bisect-limit=0 -enable-new-pm=0 \
 ; RUN:     %s 2>&1 | FileCheck %s --check-prefix=CHECK-NOT-EARLY-CSE
 ; CHECK-NOT-EARLY-CSE: BISECT: NOT running pass ({{[0-9]+}}) Early CSE on function (f1)
 ; CHECK-NOT-EARLY-CSE: BISECT: NOT running pass ({{[0-9]+}}) Early CSE on function (f2)
@@ -98,7 +98,7 @@
 
 ; Test a loop pass.
 
-; RUN: opt -disable-output -disable-verify -loop-reduce -opt-bisect-limit=-1 \
+; RUN: opt -disable-output -disable-verify -loop-reduce -opt-bisect-limit=-1 -enable-new-pm=0 \
 ; RUN:      %s 2>&1 | FileCheck %s --check-prefix=CHECK-LOOP-REDUCE
 ; CHECK-LOOP-REDUCE: BISECT: running pass ({{[0-9]+}}) Loop Strength Reduction on loop
 ; CHECK-LOOP-REDUCE: BISECT: running pass ({{[0-9]+}}) Loop Strength Reduction on loop
@@ -106,7 +106,7 @@
 ; CHECK-LOOP-REDUCE: BISECT: running pass ({{[0-9]+}}) Loop Strength Reduction on loop
 ; CHECK-LOOP-REDUCE: BISECT: running pass ({{[0-9]+}}) Loop Strength Reduction on loop
 
-; RUN: opt -disable-output -disable-verify -loop-reduce -opt-bisect-limit=0 \
+; RUN: opt -disable-output -disable-verify -loop-reduce -opt-bisect-limit=0 -enable-new-pm=0 \
 ; RUN:     %s 2>&1 | FileCheck %s --check-prefix=CHECK-NOT-LOOP-REDUCE
 ; CHECK-NOT-LOOP-REDUCE: BISECT: NOT running pass ({{[0-9]+}}) Loop Strength Reduction on loop
 ; CHECK-NOT-LOOP-REDUCE: BISECT: NOT running pass ({{[0-9]+}}) Loop Strength Reduction on loop

diff  --git a/llvm/test/Other/statistic.ll b/llvm/test/Other/statistic.ll
index b972780fc35f..66dd1f0bf66b 100644
--- a/llvm/test/Other/statistic.ll
+++ b/llvm/test/Other/statistic.ll
@@ -1,7 +1,7 @@
 ; RUN: opt < %s -o /dev/null -instsimplify -stats -stats-json 2>&1 | FileCheck %s --check-prefix=JSON
 ; RUN: opt < %s -o /dev/null -instsimplify -stats -stats-json -info-output-file %t && FileCheck %s < %t --check-prefix=JSON
-; RUN: opt < %s -o /dev/null -instsimplify -stats -stats-json -time-passes 2>&1 | FileCheck %s --check-prefixes=JSON,JSONTIME
-; RUN: opt < %s -o /dev/null -instsimplify -stats -stats-json -time-passes -info-output-file %t && FileCheck %s < %t --check-prefixes=JSON,JSONTIME
+; RUN: opt < %s -o /dev/null -instsimplify -stats -stats-json -time-passes -enable-new-pm=0 2>&1 | FileCheck %s --check-prefixes=JSON,JSONTIME
+; RUN: opt < %s -o /dev/null -instsimplify -stats -stats-json -time-passes -info-output-file %t -enable-new-pm=0 && FileCheck %s < %t --check-prefixes=JSON,JSONTIME
 ; RUN: opt < %s -o /dev/null -instsimplify -stats 2>&1 | FileCheck %s --check-prefix=DEFAULT
 ; RUN: opt < %s -o /dev/null -instsimplify -stats -info-output-file %t && FileCheck %s < %t --check-prefix=DEFAULT
 ; REQUIRES: asserts


        


More information about the llvm-commits mailing list