[llvm] f180057 - [Inliner][NPM] Fix various tests under NPM

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 10:42:45 PDT 2020


Author: Arthur Eubanks
Date: 2020-10-12T10:41:40-07:00
New Revision: f1800579666c80adf8bb2f992a639e5b8e3a389b

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

LOG: [Inliner][NPM] Fix various tests under NPM

alloca-dbgdeclare-merge.ll:
alloca-merge-align.ll:
array_merge.ll:
 NPM inliner does not merge allocas

delete-call.ll:
 NPM inliner does not delete readonly calls

externally_available.ll:
 NPM inliner does not delete available_externally functions

inline-cold-callee.ll:
inline-hot-callee.ll:
 inline-hot-callee.ll has a comment saying it only applies to legacy PM,
 I assume same for inline-cold-callee.ll

devirtualize-2.ll:
inline-hot-callsite:
monster_scc.ll:
pr22285.ll:
 already has legacy and new PM RUN lines

inline-cold.ll:
 profile-summary required to see callee as cold

prof-update-sample.ll:
 profile-summary required to update branch_weights

Reviewed By: davidxl

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

Added: 
    

Modified: 
    llvm/test/Transforms/Inline/alloca-dbgdeclare-merge.ll
    llvm/test/Transforms/Inline/alloca-merge-align.ll
    llvm/test/Transforms/Inline/array_merge.ll
    llvm/test/Transforms/Inline/delete-call.ll
    llvm/test/Transforms/Inline/devirtualize-2.ll
    llvm/test/Transforms/Inline/devirtualize-3.ll
    llvm/test/Transforms/Inline/externally_available.ll
    llvm/test/Transforms/Inline/inline-cold-callee.ll
    llvm/test/Transforms/Inline/inline-cold.ll
    llvm/test/Transforms/Inline/inline-hot-callee.ll
    llvm/test/Transforms/Inline/inline-hot-callsite.ll
    llvm/test/Transforms/Inline/monster_scc.ll
    llvm/test/Transforms/Inline/pr22285.ll
    llvm/test/Transforms/Inline/prof-update-sample.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/Inline/alloca-dbgdeclare-merge.ll b/llvm/test/Transforms/Inline/alloca-dbgdeclare-merge.ll
index d0a2bf3b1c9f..d31ab7355f99 100644
--- a/llvm/test/Transforms/Inline/alloca-dbgdeclare-merge.ll
+++ b/llvm/test/Transforms/Inline/alloca-dbgdeclare-merge.ll
@@ -18,7 +18,7 @@
 ;  g();
 ;}
 ;
-; RUN: opt -always-inline -S < %s | FileCheck %s
+; RUN: opt -always-inline -S -enable-new-pm=0 < %s | FileCheck %s
 
 ; FIXME: Why does the dbg.declare for "aaa" occur later in @h than the
 ; dbg.declare for "bbb"? I'd expect the opposite, given @f is inlined earlier.

diff  --git a/llvm/test/Transforms/Inline/alloca-merge-align.ll b/llvm/test/Transforms/Inline/alloca-merge-align.ll
index 70b94f7b69a0..e3b819d561f9 100644
--- a/llvm/test/Transforms/Inline/alloca-merge-align.ll
+++ b/llvm/test/Transforms/Inline/alloca-merge-align.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -inline -S -enable-new-pm=0 | FileCheck %s
 
 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
 target triple = "powerpc64-unknown-linux-gnu"

diff  --git a/llvm/test/Transforms/Inline/array_merge.ll b/llvm/test/Transforms/Inline/array_merge.ll
index b2eafeb0456f..8abd2989b3f7 100644
--- a/llvm/test/Transforms/Inline/array_merge.ll
+++ b/llvm/test/Transforms/Inline/array_merge.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -inline -S -enable-new-pm=0 | FileCheck %s
 ; rdar://7173846
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
 target triple = "i386-apple-darwin10.0"

diff  --git a/llvm/test/Transforms/Inline/delete-call.ll b/llvm/test/Transforms/Inline/delete-call.ll
index 9d6140a3f78e..7338fe896d61 100644
--- a/llvm/test/Transforms/Inline/delete-call.ll
+++ b/llvm/test/Transforms/Inline/delete-call.ll
@@ -1,8 +1,8 @@
 ; REQUIRES: asserts
-; RUN: opt -S -inline -stats < %s 2>&1 | FileCheck %s
+; RUN: opt -S -inline -stats -enable-new-pm=0 < %s 2>&1 | FileCheck %s
 ; CHECK: Number of functions inlined
 
-; RUN: opt -S -inline -function-attrs -stats < %s 2>&1 | FileCheck -check-prefix=CHECK-FUNCTIONATTRS %s
+; RUN: opt -S -inline -function-attrs -stats -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=CHECK-FUNCTIONATTRS %s
 ; CHECK-FUNCTIONATTRS: Number of call sites deleted, not inlined
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32"

diff  --git a/llvm/test/Transforms/Inline/devirtualize-2.ll b/llvm/test/Transforms/Inline/devirtualize-2.ll
index e2c1e7c01ae7..a0ebd5f360cd 100644
--- a/llvm/test/Transforms/Inline/devirtualize-2.ll
+++ b/llvm/test/Transforms/Inline/devirtualize-2.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -inline -S -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='cgscc(devirt<4>(inline))' -S | FileCheck %s
 ; PR4834
 

diff  --git a/llvm/test/Transforms/Inline/devirtualize-3.ll b/llvm/test/Transforms/Inline/devirtualize-3.ll
index e7d1073c69b0..4165b2125dfc 100644
--- a/llvm/test/Transforms/Inline/devirtualize-3.ll
+++ b/llvm/test/Transforms/Inline/devirtualize-3.ll
@@ -1,4 +1,4 @@
-; RUN: opt -basic-aa -inline -S -sroa -gvn -instcombine < %s | FileCheck %s
+; RUN: opt -basic-aa -S -O2 < %s | FileCheck %s
 ; PR5009
 
 ; CHECK: define i32 @main() 

diff  --git a/llvm/test/Transforms/Inline/externally_available.ll b/llvm/test/Transforms/Inline/externally_available.ll
index 0785dabf8468..adcafb290727 100644
--- a/llvm/test/Transforms/Inline/externally_available.ll
+++ b/llvm/test/Transforms/Inline/externally_available.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -inline -S -enable-new-pm=0 | FileCheck %s
 
 define available_externally i32 @test_function() {
 ; CHECK-NOT: @test_function

diff  --git a/llvm/test/Transforms/Inline/inline-cold-callee.ll b/llvm/test/Transforms/Inline/inline-cold-callee.ll
index 404c537b297f..9c8d03cabf64 100644
--- a/llvm/test/Transforms/Inline/inline-cold-callee.ll
+++ b/llvm/test/Transforms/Inline/inline-cold-callee.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -inline -inlinecold-threshold=0 -S | FileCheck %s
+; RUN: opt < %s -inline -inlinecold-threshold=0 -S -enable-new-pm=0 | FileCheck %s
 
 ; This tests that a cold callee gets the (lower) inlinecold-threshold even without
 ; Cold hint and does not get inlined because the cost exceeds the inlinecold-threshold.

diff  --git a/llvm/test/Transforms/Inline/inline-cold.ll b/llvm/test/Transforms/Inline/inline-cold.ll
index e0e679ad4036..eacc541f6545 100644
--- a/llvm/test/Transforms/Inline/inline-cold.ll
+++ b/llvm/test/Transforms/Inline/inline-cold.ll
@@ -1,13 +1,16 @@
-; RUN: opt < %s -inline -S -inlinecold-threshold=25 | FileCheck %s
+; RUN: opt < %s -inline -S -inlinecold-threshold=25 -enable-new-pm=0 | FileCheck %s
+; RUN: opt < %s -passes='require<profile-summary>,cgscc(inline)' -S -inlinecold-threshold=25 | FileCheck %s
 ; Test that functions with attribute Cold are not inlined while the 
 ; same function without attribute Cold will be inlined.
 
-; RUN: opt < %s -inline -S -inline-threshold=600 | FileCheck %s -check-prefix=OVERRIDE
+; RUN: opt < %s -inline -S -inline-threshold=600 -enable-new-pm=0 | FileCheck %s -check-prefix=OVERRIDE
+; RUN: opt < %s -passes='require<profile-summary>,cgscc(inline)' -S -inline-threshold=600 -enable-new-pm=0 | FileCheck %s -check-prefix=OVERRIDE
 ; The command line argument for inline-threshold should override
 ; the default cold threshold, so a cold function with size bigger
 ; than the default cold threshold (225) will be inlined.
 
-; RUN: opt < %s -inline -S | FileCheck %s -check-prefix=DEFAULT
+; RUN: opt < %s -inline -S -enable-new-pm=0 | FileCheck %s -check-prefix=DEFAULT
+; RUN: opt < %s -passes='require<profile-summary>,cgscc(inline)' -S | FileCheck %s -check-prefix=DEFAULT
 ; The same cold function will not be inlined with the default behavior.
 
 @a = global i32 4

diff  --git a/llvm/test/Transforms/Inline/inline-hot-callee.ll b/llvm/test/Transforms/Inline/inline-hot-callee.ll
index dad57440063b..421f9d00910b 100644
--- a/llvm/test/Transforms/Inline/inline-hot-callee.ll
+++ b/llvm/test/Transforms/Inline/inline-hot-callee.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -inline -inline-threshold=0 -inlinehint-threshold=100 -S | FileCheck %s
+; RUN: opt < %s -inline -inline-threshold=0 -inlinehint-threshold=100 -S -enable-new-pm=0 | FileCheck %s
 
 ; This tests that a hot callee gets the (higher) inlinehint-threshold even
 ; without inline hints and gets inlined because the cost is less than

diff  --git a/llvm/test/Transforms/Inline/inline-hot-callsite.ll b/llvm/test/Transforms/Inline/inline-hot-callsite.ll
index cfe1055916f6..54e7838b4299 100644
--- a/llvm/test/Transforms/Inline/inline-hot-callsite.ll
+++ b/llvm/test/Transforms/Inline/inline-hot-callsite.ll
@@ -3,7 +3,7 @@
 ; inlinehint-threshold. A cold callee with identical body does not get inlined because
 ; cost exceeds the inline-threshold
 
-; RUN: opt < %s -inline -inline-threshold=0 -hot-callsite-threshold=100 -S | FileCheck %s
+; RUN: opt < %s -inline -inline-threshold=0 -hot-callsite-threshold=100 -S -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='require<profile-summary>,cgscc(inline)' -inline-threshold=0 -hot-callsite-threshold=100 -S | FileCheck %s
 
 ; Run this with the default O2 pipeline to test that profile summary analysis

diff  --git a/llvm/test/Transforms/Inline/monster_scc.ll b/llvm/test/Transforms/Inline/monster_scc.ll
index 860e2e4fb225..b4e45e06570c 100644
--- a/llvm/test/Transforms/Inline/monster_scc.ll
+++ b/llvm/test/Transforms/Inline/monster_scc.ll
@@ -39,7 +39,7 @@
 ;
 ;   void test(bool *B, bool *E) { f<false, 0>(B, E); }
 ;
-; RUN: opt -S < %s -inline -inline-threshold=150 | FileCheck %s --check-prefixes=CHECK,OLD
+; RUN: opt -S < %s -inline -inline-threshold=150 -enable-new-pm=0 | FileCheck %s --check-prefixes=CHECK,OLD
 ; RUN: opt -S < %s -passes=inline -inline-threshold=150 | FileCheck %s --check-prefixes=CHECK,NEW
 ; RUN: opt -S < %s -passes=inliner-wrapper -inline-threshold=150 | FileCheck %s --check-prefixes=CHECK,NEW
 

diff  --git a/llvm/test/Transforms/Inline/pr22285.ll b/llvm/test/Transforms/Inline/pr22285.ll
index d7631554c2cf..e365c8581b7c 100644
--- a/llvm/test/Transforms/Inline/pr22285.ll
+++ b/llvm/test/Transforms/Inline/pr22285.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -inline -S -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='cgscc(inline),globaldce' -S | FileCheck %s
 
 $f1 = comdat any

diff  --git a/llvm/test/Transforms/Inline/prof-update-sample.ll b/llvm/test/Transforms/Inline/prof-update-sample.ll
index add861b880f9..ee475a6f3b2b 100644
--- a/llvm/test/Transforms/Inline/prof-update-sample.ll
+++ b/llvm/test/Transforms/Inline/prof-update-sample.ll
@@ -1,4 +1,5 @@
-; RUN: opt < %s -inline -S | FileCheck %s
+; RUN: opt < %s -inline -S -enable-new-pm=0 | FileCheck %s
+; RUN: opt < %s -passes='require<profile-summary>,cgscc(inline)' -S | FileCheck %s
 ; Checks if inliner updates branch_weights annotation for call instructions.
 
 declare void @ext();


        


More information about the llvm-commits mailing list