[opt] Pin -stats-json & -opt-bisect-limit tests to -enable-new-pm=0
authorFangrui Song <i@maskray.me>
Thu, 29 Oct 2020 05:58:20 +0000 (22:58 -0700)
committerFangrui Song <i@maskray.me>
Thu, 29 Oct 2020 05:59:53 +0000 (22:59 -0700)
-stats-json requires `TimeReagion PassTimer(getPassTimer(...))` in the legacy
PM. The loss of functionality is not critical because we have the similar -time-passes.

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

index 297f612..8d966de 100644 (file)
 ; 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.
 
 ; 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)
 
 ; 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
 ; 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
index b972780..66dd1f0 100644 (file)
@@ -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