[llvm] 84a8ca1 - [NewPM] Pin -lazy-branch-prob and -lazy-block-freq tests to legacy PM

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 17:51:56 PDT 2020


Author: Arthur Eubanks
Date: 2020-09-21T17:51:46-07:00
New Revision: 84a8ca1e6ce1400345e693fe7495e5d271fb2dc6

URL: https://github.com/llvm/llvm-project/commit/84a8ca1e6ce1400345e693fe7495e5d271fb2dc6
DIFF: https://github.com/llvm/llvm-project/commit/84a8ca1e6ce1400345e693fe7495e5d271fb2dc6.diff

LOG: [NewPM] Pin -lazy-branch-prob and -lazy-block-freq tests to legacy PM

NPM passes just use the normal versions of these analyses instead.
Also pin any tests with -analyze to legacy PM.

Reviewed By: asbirlea

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

Added: 
    

Modified: 
    llvm/test/Analysis/BlockFrequencyInfo/bad_input.ll
    llvm/test/Analysis/BlockFrequencyInfo/basic.ll
    llvm/test/Analysis/BlockFrequencyInfo/double_backedge.ll
    llvm/test/Analysis/BlockFrequencyInfo/double_exit.ll
    llvm/test/Analysis/BlockFrequencyInfo/extremely-likely-loop-successor.ll
    llvm/test/Analysis/BlockFrequencyInfo/irreducible.ll
    llvm/test/Analysis/BlockFrequencyInfo/irreducible_loop_crash.ll
    llvm/test/Analysis/BlockFrequencyInfo/irreducible_pgo.ll
    llvm/test/Analysis/BlockFrequencyInfo/loop_with_branch.ll
    llvm/test/Analysis/BlockFrequencyInfo/loop_with_invoke.ll
    llvm/test/Analysis/BlockFrequencyInfo/loops_with_profile_info.ll
    llvm/test/Analysis/BlockFrequencyInfo/nested_loop_with_branches.ll
    llvm/test/Analysis/BlockFrequencyInfo/redundant_edges.ll
    llvm/test/Analysis/BranchProbabilityInfo/basic.ll
    llvm/test/Analysis/BranchProbabilityInfo/deopt-intrinsic.ll
    llvm/test/Analysis/BranchProbabilityInfo/fcmp.ll
    llvm/test/Analysis/BranchProbabilityInfo/libfunc_call.ll
    llvm/test/Analysis/BranchProbabilityInfo/loop.ll
    llvm/test/Analysis/BranchProbabilityInfo/noreturn.ll
    llvm/test/Analysis/BranchProbabilityInfo/pr18705.ll
    llvm/test/Analysis/BranchProbabilityInfo/pr22718.ll
    llvm/test/Analysis/BranchProbabilityInfo/switch.ll
    llvm/test/Analysis/BranchProbabilityInfo/zero_heuristics.ll
    llvm/test/Transforms/Util/PR37334-break-crit-edges-require-dt.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/bad_input.ll b/llvm/test/Analysis/BlockFrequencyInfo/bad_input.ll
index 39009a5ba838..2b65ed093768 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/bad_input.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/bad_input.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -block-freq | FileCheck %s
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
 
 declare void @g(i32 %x)

diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/basic.ll b/llvm/test/Analysis/BlockFrequencyInfo/basic.ll
index a957adc65027..da6d4380b2af 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/basic.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/basic.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -analyze -block-freq | FileCheck %s
-; RUN: opt < %s -analyze -lazy-block-freq | FileCheck %s
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
+; RUN: opt < %s -analyze -lazy-block-freq -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
 
 define i32 @test1(i32 %i, i32* %a) {

diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/double_backedge.ll b/llvm/test/Analysis/BlockFrequencyInfo/double_backedge.ll
index 4431c3a68219..863be0377d27 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/double_backedge.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/double_backedge.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -block-freq | FileCheck %s
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
 
 define void @double_backedge(i1 %x) {

diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/double_exit.ll b/llvm/test/Analysis/BlockFrequencyInfo/double_exit.ll
index 5e9dded162c4..d61d4280a998 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/double_exit.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/double_exit.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -block-freq | FileCheck %s
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
 
 ; CHECK-LABEL: Printing analysis {{.*}} for function 'double_exit':

diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/extremely-likely-loop-successor.ll b/llvm/test/Analysis/BlockFrequencyInfo/extremely-likely-loop-successor.ll
index b9623683fe5a..d77f346d070f 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/extremely-likely-loop-successor.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/extremely-likely-loop-successor.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -block-freq | FileCheck %s
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
 
 ; PR21622: Check for a crasher when the sum of exits to the same successor of a

diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/irreducible.ll b/llvm/test/Analysis/BlockFrequencyInfo/irreducible.ll
index 410276c8249e..c639616728db 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/irreducible.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/irreducible.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -block-freq | FileCheck %s
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
 
 ; A loop with multiple exits isn't irreducible.  It should be handled

diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/irreducible_loop_crash.ll b/llvm/test/Analysis/BlockFrequencyInfo/irreducible_loop_crash.ll
index 8cd334f04bca..97ecc14911ab 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/irreducible_loop_crash.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/irreducible_loop_crash.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -block-freq
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/irreducible_pgo.ll b/llvm/test/Analysis/BlockFrequencyInfo/irreducible_pgo.ll
index 9d5499771ec2..0781f7193b8b 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/irreducible_pgo.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/irreducible_pgo.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -block-freq | FileCheck %s
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
 
 ; Function Attrs: noinline norecurse nounwind readnone uwtable

diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/loop_with_branch.ll b/llvm/test/Analysis/BlockFrequencyInfo/loop_with_branch.ll
index 40d9e82351fd..e8320038c225 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/loop_with_branch.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/loop_with_branch.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -block-freq | FileCheck %s
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
 
 ; CHECK-LABEL: Printing analysis {{.*}} for function 'loop_with_branch':

diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/loop_with_invoke.ll b/llvm/test/Analysis/BlockFrequencyInfo/loop_with_invoke.ll
index 4e554f8d9c8d..2a989ce264cc 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/loop_with_invoke.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/loop_with_invoke.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -block-freq | FileCheck %s
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
 
 ; CHECK-LABEL: Printing analysis {{.*}} for function 'loop_with_invoke':

diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/loops_with_profile_info.ll b/llvm/test/Analysis/BlockFrequencyInfo/loops_with_profile_info.ll
index 3133e167de5f..a5cf17eea1e1 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/loops_with_profile_info.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/loops_with_profile_info.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -block-freq | FileCheck %s
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
 
 ; This code contains three loops. One is triple-nested, the

diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/nested_loop_with_branches.ll b/llvm/test/Analysis/BlockFrequencyInfo/nested_loop_with_branches.ll
index 7025b5d16a45..cf0a10d4a13d 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/nested_loop_with_branches.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/nested_loop_with_branches.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -block-freq | FileCheck %s
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
 
 ; CHECK-LABEL: Printing analysis {{.*}} for function 'nested_loop_with_branches'

diff  --git a/llvm/test/Analysis/BlockFrequencyInfo/redundant_edges.ll b/llvm/test/Analysis/BlockFrequencyInfo/redundant_edges.ll
index 20ed1406c5af..2db9e024c15b 100644
--- a/llvm/test/Analysis/BlockFrequencyInfo/redundant_edges.ll
+++ b/llvm/test/Analysis/BlockFrequencyInfo/redundant_edges.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -analyze -block-freq | FileCheck %s
-; RUN: opt < %s -analyze -lazy-block-freq | FileCheck %s
+; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
+; RUN: opt < %s -analyze -lazy-block-freq -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
 
 define void @test1() {

diff  --git a/llvm/test/Analysis/BranchProbabilityInfo/basic.ll b/llvm/test/Analysis/BranchProbabilityInfo/basic.ll
index 85abfbf2702d..901dc9fce645 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/basic.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/basic.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -analyze -branch-prob | FileCheck %s
-; RUN: opt < %s -analyze -lazy-branch-prob | FileCheck %s
+; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
+; RUN: opt < %s -analyze -lazy-branch-prob -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
 define i32 @test1(i32 %i, i32* %a) {

diff  --git a/llvm/test/Analysis/BranchProbabilityInfo/deopt-intrinsic.ll b/llvm/test/Analysis/BranchProbabilityInfo/deopt-intrinsic.ll
index c2681e5e7c80..541d7d954fb2 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/deopt-intrinsic.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/deopt-intrinsic.ll
@@ -1,4 +1,4 @@
-; RUN: opt -analyze -branch-prob < %s | FileCheck %s
+; RUN: opt -analyze -branch-prob < %s -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
 declare i32 @llvm.experimental.deoptimize.i32(...)

diff  --git a/llvm/test/Analysis/BranchProbabilityInfo/fcmp.ll b/llvm/test/Analysis/BranchProbabilityInfo/fcmp.ll
index 8089916fb762..52d53492febe 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/fcmp.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/fcmp.ll
@@ -1,8 +1,9 @@
-; RUN: opt < %s -analyze -branch-prob | FileCheck %s
+; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
+; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
 ; This function tests the floating point unorder comparison. The probability
 ; of NaN should be extremely small.
-; CHECK: Printing analysis 'Branch Probability Analysis' for function 'uno'
+; CHECK: Printing analysis {{.*}} for function 'uno'
 ; CHECK:  edge  -> a probability is 0x00000800 / 0x80000000 = 0.00%
 ; CHECK:  edge  -> b probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
 
@@ -20,7 +21,7 @@ b:
 }
 
 ; This function tests the floating point order comparison.
-; CHECK: Printing analysis 'Branch Probability Analysis' for function 'ord'
+; CHECK: Printing analysis {{.*}} for function 'ord'
 ; CHECK:  edge  -> a probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
 ; CHECK:  edge  -> b probability is 0x00000800 / 0x80000000 = 0.00%
 

diff  --git a/llvm/test/Analysis/BranchProbabilityInfo/libfunc_call.ll b/llvm/test/Analysis/BranchProbabilityInfo/libfunc_call.ll
index fea0299765e2..47001f8a8927 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/libfunc_call.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/libfunc_call.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -analyze -branch-prob | FileCheck %s
-; RUN: opt < %s -analyze -lazy-branch-prob | FileCheck %s
+; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
+; RUN: opt < %s -analyze -lazy-branch-prob -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
 declare i32 @strcmp(i8*, i8*)
@@ -353,4 +353,4 @@ else:
 exit:
   %result = phi i32 [ 0, %then ], [ 1, %else ]
   ret i32 %result
-}
\ No newline at end of file
+}

diff  --git a/llvm/test/Analysis/BranchProbabilityInfo/loop.ll b/llvm/test/Analysis/BranchProbabilityInfo/loop.ll
index 63377e3ba955..26e041b65284 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/loop.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/loop.ll
@@ -1,5 +1,5 @@
 ; Test the static branch probability heuristics for no-return functions.
-; RUN: opt < %s -analyze -branch-prob | FileCheck %s
+; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<branch-prob>' --disable-output 2>&1 | FileCheck %s
 
 declare void @g1()

diff  --git a/llvm/test/Analysis/BranchProbabilityInfo/noreturn.ll b/llvm/test/Analysis/BranchProbabilityInfo/noreturn.ll
index 6e01afd2cfc8..8c23a1d3bfc9 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/noreturn.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/noreturn.ll
@@ -1,5 +1,5 @@
 ; Test the static branch probability heuristics for no-return functions.
-; RUN: opt < %s -analyze -branch-prob | FileCheck %s
+; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
 declare void @abort() noreturn

diff  --git a/llvm/test/Analysis/BranchProbabilityInfo/pr18705.ll b/llvm/test/Analysis/BranchProbabilityInfo/pr18705.ll
index 74983ef1b4f0..fe740c20aa1f 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/pr18705.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/pr18705.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -branch-prob | FileCheck %s
+; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
 ; Since neither of while.body's out-edges is an exit or a back edge,

diff  --git a/llvm/test/Analysis/BranchProbabilityInfo/pr22718.ll b/llvm/test/Analysis/BranchProbabilityInfo/pr22718.ll
index 8674f9e5ace0..eb1b45e857c6 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/pr22718.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/pr22718.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -analyze -branch-prob | FileCheck %s
+; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
 ; In this test, the else clause is taken about 90% of the time. This was not

diff  --git a/llvm/test/Analysis/BranchProbabilityInfo/switch.ll b/llvm/test/Analysis/BranchProbabilityInfo/switch.ll
index 491fdad94d78..a8885327c430 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/switch.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/switch.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -analyze -branch-prob | FileCheck %s
-; RUN: opt < %s -analyze -lazy-branch-prob | FileCheck %s
+; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
+; RUN: opt < %s -analyze -lazy-branch-prob -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
 declare void @g(i32)

diff  --git a/llvm/test/Analysis/BranchProbabilityInfo/zero_heuristics.ll b/llvm/test/Analysis/BranchProbabilityInfo/zero_heuristics.ll
index c6e1cb8c265a..68aed8d7ce7c 100644
--- a/llvm/test/Analysis/BranchProbabilityInfo/zero_heuristics.ll
+++ b/llvm/test/Analysis/BranchProbabilityInfo/zero_heuristics.ll
@@ -1,4 +1,5 @@
-; RUN: opt < %s -analyze -branch-prob | FileCheck %s
+; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
+; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
 
 @A = global i32 0, align 4
 @B = global i32 0, align 4

diff  --git a/llvm/test/Transforms/Util/PR37334-break-crit-edges-require-dt.ll b/llvm/test/Transforms/Util/PR37334-break-crit-edges-require-dt.ll
index 866ff93be7eb..04eccc817a17 100644
--- a/llvm/test/Transforms/Util/PR37334-break-crit-edges-require-dt.ll
+++ b/llvm/test/Transforms/Util/PR37334-break-crit-edges-require-dt.ll
@@ -1,7 +1,7 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -loop-sink -break-crit-edges -branch-prob -S | FileCheck %s
-; RUN: opt < %s -loop-sink -break-crit-edges -lazy-block-freq -S | FileCheck %s
-; RUN: opt < %s -loop-sink -break-crit-edges -lazy-branch-prob -S | FileCheck %s
+; RUN: opt < %s -loop-sink -break-crit-edges -lazy-block-freq -S -enable-new-pm=0 | FileCheck %s
+; RUN: opt < %s -loop-sink -break-crit-edges -lazy-branch-prob -S -enable-new-pm=0 | FileCheck %s
 
 ; BreakCriticalEdges tries to update LI and DT if they are present. However,
 ; updating LI actually needs a DT, so we now require DT in


        


More information about the llvm-commits mailing list