From a9af1b9a307780a39facd016c7329990d6cc5508 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 17 Jul 2022 21:42:59 -0700 Subject: [PATCH] [test] Change -function-import tests to use -passes= --- llvm/test/ThinLTO/X86/crash_debuginfo.ll | 2 +- llvm/test/ThinLTO/X86/distributed_import.ll | 8 ++++---- llvm/test/ThinLTO/X86/guid_collision.ll | 2 +- llvm/test/ThinLTO/X86/writeonly-with-refs.ll | 4 ++-- .../Transforms/FunctionImport/adjustable_threshold.ll | 6 +++--- llvm/test/Transforms/FunctionImport/cg_profile.ll | 2 +- llvm/test/Transforms/FunctionImport/funcimport.ll | 4 ++-- .../test/Transforms/FunctionImport/funcimport_alias.ll | 2 +- .../Transforms/FunctionImport/funcimport_cutoff.ll | 6 +++--- .../test/Transforms/FunctionImport/funcimport_debug.ll | 2 +- .../Transforms/FunctionImport/funcimport_forcecold.ll | 6 +++--- .../FunctionImport/funcimport_forcecold_samplepgo.ll | 6 +++--- .../Transforms/FunctionImport/hotness_based_import.ll | 18 +++++++++--------- llvm/test/Transforms/FunctionImport/inlineasm.ll | 2 +- llvm/test/Transforms/FunctionImport/noinline.ll | 4 ++-- .../PGOProfile/thinlto_indirect_call_promotion.ll | 2 +- .../Transforms/PGOProfile/thinlto_samplepgo_icp.ll | 2 +- 17 files changed, 39 insertions(+), 39 deletions(-) diff --git a/llvm/test/ThinLTO/X86/crash_debuginfo.ll b/llvm/test/ThinLTO/X86/crash_debuginfo.ll index 0186f00..9e6f9aa 100644 --- a/llvm/test/ThinLTO/X86/crash_debuginfo.ll +++ b/llvm/test/ThinLTO/X86/crash_debuginfo.ll @@ -1,7 +1,7 @@ ; RUN: opt -module-summary -o %t-dst.bc %s ; RUN: opt -module-summary -o %t-src.bc %p/Inputs/crash_debuginfo.ll ; RUN: llvm-lto -thinlto -o %t-index %t-dst.bc %t-src.bc -; RUN: opt -function-import -inline -summary-file %t-index.thinlto.bc %t-dst.bc -o %t.out +; RUN: opt -passes=function-import,inline -summary-file %t-index.thinlto.bc %t-dst.bc -o %t.out ; RUN: llvm-nm -U %t.out | FileCheck %s --implicit-check-not=_bar ; Verify that we import bar and inline it. It use to crash importing due to ODR type uniquing diff --git a/llvm/test/ThinLTO/X86/distributed_import.ll b/llvm/test/ThinLTO/X86/distributed_import.ll index 59e2915..6f5acd8 100644 --- a/llvm/test/ThinLTO/X86/distributed_import.ll +++ b/llvm/test/ThinLTO/X86/distributed_import.ll @@ -14,8 +14,8 @@ ; RUN: -r=%t2.bc,g,px \ ; RUN: -r=%t2.bc,analias,px \ ; RUN: -r=%t2.bc,aliasee,px -; RUN: opt -function-import -import-all-index -enable-import-metadata -summary-file %t1.bc.thinlto.bc %t1.bc -o %t1.out -; RUN: opt -function-import -import-all-index -summary-file %t2.bc.thinlto.bc %t2.bc -o %t2.out +; RUN: opt -passes=function-import -import-all-index -enable-import-metadata -summary-file %t1.bc.thinlto.bc %t1.bc -o %t1.out +; RUN: opt -passes=function-import -import-all-index -summary-file %t2.bc.thinlto.bc %t2.bc -o %t2.out ; RUN: llvm-dis -o - %t1.out | FileCheck %s --check-prefix=IMPORT ; RUN: llvm-dis -o - %t2.out | FileCheck %s --check-prefix=EXPORT @@ -48,8 +48,8 @@ ; Make sure importing occurs as expected ; RUN: cp %t1.bc.sv %t1.bc ; RUN: cp %t2.bc.sv %t2.bc -; RUN: opt -function-import -import-all-index -enable-import-metadata -summary-file %t1.bc.thinlto.bc %t1.bc -o %t1.out -; RUN: opt -function-import -import-all-index -summary-file %t2.bc.thinlto.bc %t2.bc -o %t2.out +; RUN: opt -passes=function-import -import-all-index -enable-import-metadata -summary-file %t1.bc.thinlto.bc %t1.bc -o %t1.out +; RUN: opt -passes=function-import -import-all-index -summary-file %t2.bc.thinlto.bc %t2.bc -o %t2.out ; RUN: llvm-dis -o - %t1.out | FileCheck %s --check-prefix=IMPORT ; RUN: llvm-dis -o - %t2.out | FileCheck %s --check-prefix=EXPORT diff --git a/llvm/test/ThinLTO/X86/guid_collision.ll b/llvm/test/ThinLTO/X86/guid_collision.ll index 70fea26..f568570 100644 --- a/llvm/test/ThinLTO/X86/guid_collision.ll +++ b/llvm/test/ThinLTO/X86/guid_collision.ll @@ -9,7 +9,7 @@ ; RUN: llvm-lto2 run %t.bc %t2.bc -o %t.out -thinlto-distributed-indexes \ ; RUN: -r=%t.bc,H,px -r=%t.bc,G, -r=%t2.bc,G,px -; RUN: opt -function-import -import-all-index -summary-file %t.bc.thinlto.bc %t.bc -o %t.out +; RUN: opt -passes=function-import -import-all-index -summary-file %t.bc.thinlto.bc %t.bc -o %t.out ; RUN: llvm-dis -o - %t.out | FileCheck %s ; Validate that G was imported diff --git a/llvm/test/ThinLTO/X86/writeonly-with-refs.ll b/llvm/test/ThinLTO/X86/writeonly-with-refs.ll index 787d977..62ed933 100644 --- a/llvm/test/ThinLTO/X86/writeonly-with-refs.ll +++ b/llvm/test/ThinLTO/X86/writeonly-with-refs.ll @@ -19,8 +19,8 @@ ; RUN: -r=%t1,_Z3foov,l \ ; RUN: -r=%t2,_Z3foov,pl \ ; RUN: -r=%t2,outer,pl -; RUN: opt -function-import -import-all-index -enable-import-metadata -summary-file %t1.thinlto.bc %t1 -o %t1.out -; RUN: opt -function-import -import-all-index -summary-file %t2.thinlto.bc %t2 -o %t2.out +; RUN: opt -passes=function-import -import-all-index -enable-import-metadata -summary-file %t1.thinlto.bc %t1 -o %t1.out +; RUN: opt -passes=function-import -import-all-index -summary-file %t2.thinlto.bc %t2 -o %t2.out ; RUN: llvm-dis %t1.out -o - | FileCheck %s ; RUN: llvm-dis %t2.out -o - | FileCheck %s diff --git a/llvm/test/Transforms/FunctionImport/adjustable_threshold.ll b/llvm/test/Transforms/FunctionImport/adjustable_threshold.ll index 507e766..f60758c 100644 --- a/llvm/test/Transforms/FunctionImport/adjustable_threshold.ll +++ b/llvm/test/Transforms/FunctionImport/adjustable_threshold.ll @@ -4,15 +4,15 @@ ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc ; Test import with default progressive instruction factor -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=10 -S | FileCheck %s --check-prefix=INSTLIM-DEFAULT +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=10 -S | FileCheck %s --check-prefix=INSTLIM-DEFAULT ; INSTLIM-DEFAULT: call void @staticfunc2.llvm. ; Test import with a reduced progressive instruction factor -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=10 -import-instr-evolution-factor=0.5 -S | FileCheck %s --check-prefix=INSTLIM-PROGRESSIVE +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=10 -import-instr-evolution-factor=0.5 -S | FileCheck %s --check-prefix=INSTLIM-PROGRESSIVE ; INSTLIM-PROGRESSIVE-NOT: call void @staticfunc ; Test force import all -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc \ +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc \ ; RUN: -import-instr-limit=1 -force-import-all -S \ ; RUN: | FileCheck %s --check-prefix=IMPORTALL ; IMPORTALL-DAG: define available_externally void @globalfunc1() diff --git a/llvm/test/Transforms/FunctionImport/cg_profile.ll b/llvm/test/Transforms/FunctionImport/cg_profile.ll index e457aa6..8c71fe6 100644 --- a/llvm/test/Transforms/FunctionImport/cg_profile.ll +++ b/llvm/test/Transforms/FunctionImport/cg_profile.ll @@ -4,7 +4,7 @@ ; RUN: opt -passes=cg-profile -module-summary %s -o %t.bc ; RUN: opt -module-summary %p/Inputs/cg_profile.ll -o %t2.bc ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc -; RUN: opt -function-import -print-imports -summary-file %t3.thinlto.bc %t.bc \ +; RUN: opt -passes=function-import -print-imports -summary-file %t3.thinlto.bc %t.bc \ ; RUN: -S 2>&1 | FileCheck %s ; CHECK: !0 = !{i32 1, !"EnableSplitLTOUnit", i32 0} diff --git a/llvm/test/Transforms/FunctionImport/funcimport.ll b/llvm/test/Transforms/FunctionImport/funcimport.ll index 610a5ba..0129825 100644 --- a/llvm/test/Transforms/FunctionImport/funcimport.ll +++ b/llvm/test/Transforms/FunctionImport/funcimport.ll @@ -6,7 +6,7 @@ ; RUN: llvm-lto -thinlto -print-summary-global-ids -o %t3 %t.bc %t2.bc 2>&1 | FileCheck %s --check-prefix=GUID ; Do the import now -; RUN: opt -function-import -stats -print-imports -enable-import-metadata -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=INSTLIMDEF +; RUN: opt -passes=function-import -stats -print-imports -enable-import-metadata -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=INSTLIMDEF ; Try again with new pass manager ; RUN: opt -passes='function-import' -stats -print-imports -enable-import-metadata -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=INSTLIMDEF ; RUN: opt -passes='function-import' -debug-only=function-import -enable-import-metadata -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=DUMP @@ -14,7 +14,7 @@ ; REQUIRES: asserts ; Test import with smaller instruction limit -; RUN: opt -function-import -enable-import-metadata -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=5 -S | FileCheck %s --check-prefix=CHECK --check-prefix=INSTLIM5 +; RUN: opt -passes=function-import -enable-import-metadata -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=5 -S | FileCheck %s --check-prefix=CHECK --check-prefix=INSTLIM5 ; INSTLIM5-NOT: @staticfunc.llvm. ; Test force import all diff --git a/llvm/test/Transforms/FunctionImport/funcimport_alias.ll b/llvm/test/Transforms/FunctionImport/funcimport_alias.ll index b8ce66c..44b813a 100644 --- a/llvm/test/Transforms/FunctionImport/funcimport_alias.ll +++ b/llvm/test/Transforms/FunctionImport/funcimport_alias.ll @@ -6,7 +6,7 @@ ; Do the import now. Ensures that the importer handles an external call ; from imported callanalias() to a function that is defined already in ; the dest module, but as an alias. -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -S | FileCheck %s +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -S | FileCheck %s define i32 @main() #0 { entry: diff --git a/llvm/test/Transforms/FunctionImport/funcimport_cutoff.ll b/llvm/test/Transforms/FunctionImport/funcimport_cutoff.ll index dac4bd1..168afd3 100644 --- a/llvm/test/Transforms/FunctionImport/funcimport_cutoff.ll +++ b/llvm/test/Transforms/FunctionImport/funcimport_cutoff.ll @@ -9,13 +9,13 @@ ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc ; First do with default options, which should import both foo and bar -; RUN: opt -function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=IMPORT +; RUN: opt -passes=function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=IMPORT ; Next try to restrict to 1 import. This should import just foo. -; RUN: opt -import-cutoff=1 -function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=IMPORT1 +; RUN: opt -import-cutoff=1 -passes=function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=IMPORT1 ; Next try to restrict to 0 imports. This should not import. -; RUN: opt -import-cutoff=0 -function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=NOIMPORT +; RUN: opt -import-cutoff=0 -passes=function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=NOIMPORT define i32 @main() { entry: diff --git a/llvm/test/Transforms/FunctionImport/funcimport_debug.ll b/llvm/test/Transforms/FunctionImport/funcimport_debug.ll index 1cf7666..f449047 100644 --- a/llvm/test/Transforms/FunctionImport/funcimport_debug.ll +++ b/llvm/test/Transforms/FunctionImport/funcimport_debug.ll @@ -4,7 +4,7 @@ ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc ; Do the import now and confirm that metadata is linked for imported function. -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -S | FileCheck %s +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -S | FileCheck %s ; CHECK: define available_externally void @func() diff --git a/llvm/test/Transforms/FunctionImport/funcimport_forcecold.ll b/llvm/test/Transforms/FunctionImport/funcimport_forcecold.ll index a9aa77f..b028997 100644 --- a/llvm/test/Transforms/FunctionImport/funcimport_forcecold.ll +++ b/llvm/test/Transforms/FunctionImport/funcimport_forcecold.ll @@ -8,20 +8,20 @@ ; RUN: opt -module-summary %s -o %t.bc ; RUN: opt -module-summary %p/Inputs/funcimport_forcecold.ll -o %t2.bc ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc -; RUN: opt -function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=IMPORT +; RUN: opt -passes=function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=IMPORT ; Next rebuild caller module summary with non-critical edges forced cold (which ; should affect all edges in this test as we don't have any sample pgo). ; Make sure we don't import. ; RUN: opt -force-summary-edges-cold=all-non-critical -module-summary %s -o %t.bc ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc -; RUN: opt -function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=NOIMPORT +; RUN: opt -passes=function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=NOIMPORT ; Next rebuild caller module summary with all edges forced cold. ; Make sure we don't import. ; RUN: opt -force-summary-edges-cold=all -module-summary %s -o %t.bc ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc -; RUN: opt -function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=NOIMPORT +; RUN: opt -passes=function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=NOIMPORT define i32 @main() { entry: diff --git a/llvm/test/Transforms/FunctionImport/funcimport_forcecold_samplepgo.ll b/llvm/test/Transforms/FunctionImport/funcimport_forcecold_samplepgo.ll index 4ff02b9..43b8e88 100644 --- a/llvm/test/Transforms/FunctionImport/funcimport_forcecold_samplepgo.ll +++ b/llvm/test/Transforms/FunctionImport/funcimport_forcecold_samplepgo.ll @@ -8,19 +8,19 @@ ; RUN: opt -module-summary %s -o %t.bc ; RUN: opt -module-summary %p/Inputs/funcimport_forcecold.ll -o %t2.bc ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc -; RUN: opt -function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=IMPORT +; RUN: opt -passes=function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=IMPORT ; Next rebuild caller module summary with only non-critical edges forced cold, ; which should still import in this case. ; RUN: opt -force-summary-edges-cold=all-non-critical -module-summary %s -o %t.bc ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc -; RUN: opt -function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=IMPORT +; RUN: opt -passes=function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=IMPORT ; Next rebuild caller module summary with all edges forced cold. ; Make sure we don't import. ; RUN: opt -force-summary-edges-cold=all -module-summary %s -o %t.bc ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc -; RUN: opt -function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=NOIMPORT +; RUN: opt -passes=function-import -stats -print-imports -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s --check-prefix=NOIMPORT define i32 @main() !prof !1 { entry: diff --git a/llvm/test/Transforms/FunctionImport/hotness_based_import.ll b/llvm/test/Transforms/FunctionImport/hotness_based_import.ll index d45ba3b..7e9107e 100644 --- a/llvm/test/Transforms/FunctionImport/hotness_based_import.ll +++ b/llvm/test/Transforms/FunctionImport/hotness_based_import.ll @@ -4,11 +4,11 @@ ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc ; Test import with default hot multiplier (3) and default hot-evolution-factor (1.0) -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 --S | FileCheck %s --check-prefix=HOT-DEFAULT -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 --S -import-hot-multiplier=3.0 -import-cold-multiplier=0.0 | FileCheck %s --check-prefix=HOT-DEFAULT -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 --S -import-hot-multiplier=3.0 | FileCheck %s --check-prefix=HOT-DEFAULT -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 --S -import-hot-multiplier=3.0 -import-instr-evolution-factor=0.0 | FileCheck %s --check-prefix=HOT-DEFAULT -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 --S -import-hot-multiplier=3.0 -import-hot-evolution-factor=1.0 | FileCheck %s --check-prefix=HOT-DEFAULT +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 --S | FileCheck %s --check-prefix=HOT-DEFAULT +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 --S -import-hot-multiplier=3.0 -import-cold-multiplier=0.0 | FileCheck %s --check-prefix=HOT-DEFAULT +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 --S -import-hot-multiplier=3.0 | FileCheck %s --check-prefix=HOT-DEFAULT +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 --S -import-hot-multiplier=3.0 -import-instr-evolution-factor=0.0 | FileCheck %s --check-prefix=HOT-DEFAULT +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 --S -import-hot-multiplier=3.0 -import-hot-evolution-factor=1.0 | FileCheck %s --check-prefix=HOT-DEFAULT ; HOT-DEFAULT-DAG: define available_externally void @hot1() ; HOT-DEFAULT-DAG: define available_externally void @hot2() ; HOT-DEFAULT-DAG: define available_externally void @calledFromHot() @@ -24,7 +24,7 @@ ; This one tests if we decay threshold for hot callsites. With hot-evolution-factor of 0 ; we should not import any of calledFromHot functions -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 --S -import-hot-multiplier=3.0 -import-hot-evolution-factor=0.0 | FileCheck %s --check-prefix=HOT-EVOLUTION +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 --S -import-hot-multiplier=3.0 -import-hot-evolution-factor=0.0 | FileCheck %s --check-prefix=HOT-EVOLUTION ; HOT-EVOLUTION-DAG: define available_externally void @hot1() ; HOT-EVOLUTION-DAG: define available_externally void @hot2() ; HOT-EVOLUTION-DAG: define available_externally void @none1() @@ -37,7 +37,7 @@ ; HOT-EVOLUTION-NOT: define available_externally void @calledFromHot2() ; Test import with hot multiplier 1.0 - treat hot callsites as normal. -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 -import-hot-multiplier=1.0 --S | FileCheck %s --check-prefix=HOT-ONE +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 -import-hot-multiplier=1.0 --S | FileCheck %s --check-prefix=HOT-ONE ; HOT-ONE-DAG: define available_externally void @hot1() ; HOT-ONE-DAG: define available_externally void @none1() ; HOT-ONE-NOT: define available_externally void @cold() @@ -47,7 +47,7 @@ ; HOT-ONE-NOT: define available_externally void @none3() ; HOT-ONE-NOT: define available_externally void @cold2() -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 -import-hot-multiplier=1.0 -import-cold-multiplier=1.0 --S | FileCheck %s --check-prefix=HOT-COLD-ONE +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=1 -import-hot-multiplier=1.0 -import-cold-multiplier=1.0 --S | FileCheck %s --check-prefix=HOT-COLD-ONE ; HOT-COLD-ONE-DAG: define available_externally void @hot1() ; HOT-COLD-ONE-DAG: define available_externally void @cold() ; HOT-COLD-ONE-DAG: define available_externally void @none1() @@ -58,7 +58,7 @@ ; HOT-COLD-ONE-NOT: define available_externally void @cold2() ; Test import with hot multiplier 0.0 and high threshold - don't import functions called from hot callsite. -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=10 -import-hot-multiplier=0.0 -import-cold-multiplier=1.0 --S | FileCheck %s --check-prefix=HOT-ZERO +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=10 -import-hot-multiplier=0.0 -import-cold-multiplier=1.0 --S | FileCheck %s --check-prefix=HOT-ZERO ; HOT-ZERO-DAG: define available_externally void @cold() ; HOT-ZERO-DAG: define available_externally void @none1() ; HOT-ZERO-DAG: define available_externally void @none2() diff --git a/llvm/test/Transforms/FunctionImport/inlineasm.ll b/llvm/test/Transforms/FunctionImport/inlineasm.ll index de6fd7a..f985060 100644 --- a/llvm/test/Transforms/FunctionImport/inlineasm.ll +++ b/llvm/test/Transforms/FunctionImport/inlineasm.ll @@ -6,7 +6,7 @@ ; Attempt the import now, ensure below that file containing inline assembly ; is not imported from. Otherwise we would need to promote its local variable ; used in the inline assembly, which would not see the rename. -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -S 2>&1 | FileCheck %s define i32 @main() #0 { entry: diff --git a/llvm/test/Transforms/FunctionImport/noinline.ll b/llvm/test/Transforms/FunctionImport/noinline.ll index 05769d5..58a8de5 100644 --- a/llvm/test/Transforms/FunctionImport/noinline.ll +++ b/llvm/test/Transforms/FunctionImport/noinline.ll @@ -6,9 +6,9 @@ ; Attempt the import now, ensure below that file containing noinline ; is not imported by default but imported with -force-import-all. -; RUN: opt -function-import -summary-file %t.summary.thinlto.bc %t.main.bc -S 2>&1 \ +; RUN: opt -passes=function-import -summary-file %t.summary.thinlto.bc %t.main.bc -S 2>&1 \ ; RUN: | FileCheck -check-prefix=NOIMPORT %s -; RUN: opt -function-import -force-import-all -summary-file %t.summary.thinlto.bc \ +; RUN: opt -passes=function-import -force-import-all -summary-file %t.summary.thinlto.bc \ ; RUN: %t.main.bc -S 2>&1 | FileCheck -check-prefix=IMPORT %s define i32 @main() #0 { diff --git a/llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll b/llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll index 4cdf732..173296f 100644 --- a/llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll +++ b/llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll @@ -3,7 +3,7 @@ ; RUN: opt -module-summary %p/Inputs/thinlto_indirect_call_promotion.ll -o %t2.bc ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -o %t4.bc -print-imports 2>&1 | FileCheck %s --check-prefix=IMPORTS +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -o %t4.bc -print-imports 2>&1 | FileCheck %s --check-prefix=IMPORTS ; IMPORTS-DAG: Import a ; IMPORTS-DAG: Import c diff --git a/llvm/test/Transforms/PGOProfile/thinlto_samplepgo_icp.ll b/llvm/test/Transforms/PGOProfile/thinlto_samplepgo_icp.ll index 52c545f..e04da93 100644 --- a/llvm/test/Transforms/PGOProfile/thinlto_samplepgo_icp.ll +++ b/llvm/test/Transforms/PGOProfile/thinlto_samplepgo_icp.ll @@ -5,7 +5,7 @@ ; Checks if calls to static target functions are properly imported and promoted ; by ICP. Note that the GUID in the profile is from the oroginal name. -; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -o %t4.bc -print-imports 2>&1 | FileCheck %s --check-prefix=IMPORTS +; RUN: opt -passes=function-import -summary-file %t3.thinlto.bc %t.bc -o %t4.bc -print-imports 2>&1 | FileCheck %s --check-prefix=IMPORTS ; IMPORTS: Import _ZL3foov.llvm.0 ; RUN: opt %t4.bc -icp-lto -passes=pgo-icall-prom -S | FileCheck %s --check-prefix=ICALL-PROM -- 2.7.4