From d648aa1b8e937de1648524e1f1016b53b29ba2a4 Mon Sep 17 00:00:00 2001 From: Maksim Panchenko Date: Fri, 10 Jun 2022 14:10:58 -0700 Subject: [PATCH] [BOLT][TEST] Use double dash flags in tests Replace a single dash with a double dash for options that have more than a single letter. llvm-bolt-wrapper.py has special treatment for output options such as "-o" and "-w" causing issues when a single dash is used, e.g. for "-write-dwp". The wrapper can be fixed as well, but using a double dash has other advantages as well. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D127538 --- bolt/test/AArch64/asm-func-debug.test | 2 +- bolt/test/AArch64/constant-island-alignment.s | 2 +- .../test/AArch64/constant_island_pie_update.s | 2 +- bolt/test/AArch64/double_jump.cpp | 2 +- bolt/test/AArch64/ext-double-jump.s | 2 +- bolt/test/AArch64/go_dwarf.test | 2 +- bolt/test/AArch64/plt-gnu-ld.test | 4 ++-- bolt/test/AArch64/runtime-relocs.test | 8 ++++---- bolt/test/AArch64/skip-got-rel.test | 2 +- bolt/test/AArch64/tailcall_traps.s | 4 ++-- bolt/test/AArch64/text-data.c | 2 +- bolt/test/AArch64/unmarked-data.test | 2 +- bolt/test/AArch64/update-debug-reloc.test | 2 +- bolt/test/R_ABS.pic.lld.cpp | 2 +- bolt/test/X86/addr32.s | 4 ++-- bolt/test/X86/asm-dump.c | 4 ++-- bolt/test/X86/asm-func-debug.test | 2 +- bolt/test/X86/avx512-trap.test | 4 ++-- bolt/test/X86/bb-with-two-tail-calls.s | 4 ++-- bolt/test/X86/block-reordering.test | 6 +++--- bolt/test/X86/branch-data.test | 2 +- bolt/test/X86/bug-reorder-bb-jrcxz.s | 8 ++++---- bolt/test/X86/cfi-expr-rewrite.s | 2 +- bolt/test/X86/cfi-instrs-count.s | 2 +- bolt/test/X86/cfi-instrs-reordered.s | 4 ++-- bolt/test/X86/cmov-conversion.s | 6 +++--- bolt/test/X86/ctc-and-unreachable.test | 2 +- bolt/test/X86/data-to-data-pcrel.s | 2 +- bolt/test/X86/debug-fission-single.s | 2 +- bolt/test/X86/double-jump.test | 4 ++-- bolt/test/X86/double-rel.s | 2 +- .../X86/dwarf-handle-visit-loclist-error.s | 2 +- .../dwarf4-ftypes-dwo-input-dwp-output.test | 2 +- .../dwarf4-ftypes-dwp-input-dwp-output.test | 2 +- .../X86/dwarf5-debug-info-dwarf4-debug-line.s | 2 +- bolt/test/X86/dwarf5-debug-line.s | 2 +- bolt/test/X86/dwarf5-debug-loclists.s | 2 +- bolt/test/X86/dwarf5-label-low-pc.s | 2 +- bolt/test/X86/dwarf5-locexpr-addrx.s | 2 +- bolt/test/X86/dwarf5-loclist-offset-form.test | 2 +- bolt/test/X86/dwarf5-lowpc-highpc-convert.s | 2 +- .../X86/dwarf5-rangeoffset-to-rangeindex.s | 2 +- bolt/test/X86/dwarf5-two-loclists.test | 2 +- bolt/test/X86/dwarf5-two-rnglists.test | 2 +- bolt/test/X86/exceptions-args.test | 2 +- bolt/test/X86/fallthrough-to-noop.test | 4 ++-- bolt/test/X86/false-jump-table.s | 4 ++-- bolt/test/X86/fptr-addend-pcrel.s | 2 +- bolt/test/X86/gdbindex.test | 2 +- bolt/test/X86/gotpcrelx.s | 6 +++--- bolt/test/X86/high_pc_udata.s | 2 +- bolt/test/X86/icf-jump-tables.test | 2 +- bolt/test/X86/indirect-goto.test | 3 ++- bolt/test/X86/inline-debug-info.test | 5 +++-- bolt/test/X86/inlined-function-mixed.test | 4 ++-- bolt/test/X86/insert-addr-rnglists_base.s | 2 +- bolt/test/X86/internal-call-instrument-so.s | 2 +- bolt/test/X86/internal-call-instrument.s | 2 +- .../X86/interprocedural-ref-entry-point.s | 3 ++- bolt/test/X86/issue20.s | 2 +- bolt/test/X86/issue20.test | 2 +- bolt/test/X86/issue26.s | 2 +- bolt/test/X86/issue26.test | 2 +- bolt/test/X86/jmpjmp.test | 2 +- .../X86/jump-table-footprint-reduction.test | 4 ++-- bolt/test/X86/jump-table-icp.test | 16 ++++++++-------- bolt/test/X86/jump-table-pic-order.test | 2 +- bolt/test/X86/jump-table-reference.test | 2 +- bolt/test/X86/layout-heuristic.test | 7 ++++--- bolt/test/X86/line-number.test | 6 +++--- bolt/test/X86/loop-inversion-pass.s | 15 +++++++++------ bolt/test/X86/loop-nest.test | 5 +++-- bolt/test/X86/lto-name-match.s | 2 +- bolt/test/X86/no-entry-reordering.test | 4 ++-- bolt/test/X86/no-output.test | 4 ++-- bolt/test/X86/plt-sec-8-byte.test | 2 +- bolt/test/X86/plt-sec.test | 4 ++-- bolt/test/X86/reader.test | 2 +- bolt/test/X86/relaxed-tailcall.test | 2 +- bolt/test/X86/remove-unused.test | 6 +++--- bolt/test/X86/rodata-simpl-loads.test | 2 +- bolt/test/X86/sctc-bug.test | 3 ++- bolt/test/X86/sctc-bug2.test | 4 ++-- bolt/test/X86/sctc-bug3.test | 4 ++-- bolt/test/X86/shared-abbrev.s | 2 +- bolt/test/X86/shrinkwrapping-and-rsp.s | 6 +++--- bolt/test/X86/shrinkwrapping-critedge.s | 6 +++--- bolt/test/X86/shrinkwrapping-insertcfi.s | 4 ++-- bolt/test/X86/shrinkwrapping-pop-order.s | 4 ++-- bolt/test/X86/shrinkwrapping-popf.s | 2 +- bolt/test/X86/shrinkwrapping.test | 4 ++-- .../split-func-jump-table-fragment-noparent.s | 2 +- .../split-func-jump-table-fragment-reverse.s | 2 +- .../test/X86/split-func-jump-table-fragment.s | 2 +- bolt/test/X86/srol-bug.test | 4 ++-- bolt/test/X86/symtab-secondary-entries.test | 4 ++-- bolt/test/X86/tail-duplication-cache.s | 9 +++++---- bolt/test/X86/tail-duplication-cacheline.s | 4 ++-- bolt/test/X86/tail-duplication-complex.s | 5 +++-- bolt/test/X86/tail-duplication-jt.s | 6 +++--- bolt/test/X86/tail-duplication-pass.s | 5 +++-- bolt/test/X86/tail-duplication-prop-bug.s | 6 +++--- bolt/test/X86/tailcall-traps.test | 4 ++-- bolt/test/X86/tailcall.test | 2 +- bolt/test/X86/vararg.test | 2 +- bolt/test/X86/zero-sized-object.s | 4 ++-- bolt/test/bolt-icf.test | 2 +- bolt/test/cache+-deprecated.test | 2 +- bolt/test/invalid-profile.test | 2 +- bolt/test/keep-aranges.test | 2 +- bolt/test/no-relocs.test | 2 +- bolt/test/non-empty-debug-line.test | 2 +- bolt/test/runtime/AArch64/adrrelaxationpass.s | 2 +- .../AArch64/constant-island-relocations.s | 2 +- bolt/test/runtime/AArch64/controlflow.s | 2 +- bolt/test/runtime/AArch64/issue177.s | 2 +- .../runtime/X86/basic-instrumentation.test | 8 ++++---- .../X86/exceptions-instrumentation.test | 9 +++++---- bolt/test/runtime/X86/exceptions-pic.test | 2 +- bolt/test/runtime/X86/exceptions-run.test | 4 ++-- bolt/test/runtime/X86/fdata-escape-chars.ll | 8 ++++---- bolt/test/runtime/X86/fix-branches-jrcxz.s | 4 ++-- bolt/test/runtime/X86/hot-end-symbol.s | 4 ++-- bolt/test/runtime/X86/indirect-goto-pie.test | 2 +- .../runtime/X86/instrumentation-dup-jts.s | 8 ++++---- .../runtime/X86/instrumentation-ind-calls.s | 8 ++++---- .../runtime/X86/instrumentation-indirect.c | 14 +++++++------- bolt/test/runtime/X86/instrumentation-pie.c | 6 +++--- bolt/test/runtime/X86/instrumentation-shlib.c | 6 +++--- .../runtime/X86/internal-call-instrument.test | 2 +- bolt/test/runtime/X86/internal-call.test | 2 +- bolt/test/runtime/X86/interp-overwrite-bug.s | 3 ++- .../test/runtime/X86/retpoline-synthetic.test | 2 +- .../runtime/X86/section-reloc-with-addend.s | 2 +- .../runtime/X86/shrinkwrapping-alignment.s | 4 ++-- bolt/test/runtime/X86/shrinkwrapping-lock.s | 4 ++-- .../test/runtime/X86/shrinkwrapping-pushpop.s | 4 ++-- .../X86/tail-duplication-constant-prop.s | 6 ++++-- bolt/test/runtime/X86/three-way-branch-pass.s | 4 ++-- bolt/test/runtime/X86/user-func-reorder.c | 4 ++-- bolt/test/runtime/fptr.test | 2 +- bolt/test/runtime/iplt.c | 2 +- bolt/test/runtime/meta-merge-fdata.test | 19 +++++++++++-------- bolt/test/runtime/plt-gnu-ld.test | 2 +- bolt/test/runtime/plt-lld.test | 4 ++-- 145 files changed, 276 insertions(+), 257 deletions(-) diff --git a/bolt/test/AArch64/asm-func-debug.test b/bolt/test/AArch64/asm-func-debug.test index 7c679ed8ce9c..37499ecfeecd 100644 --- a/bolt/test/AArch64/asm-func-debug.test +++ b/bolt/test/AArch64/asm-func-debug.test @@ -4,7 +4,7 @@ # The input test case foo() contains nops that we remove. RUN: %clang %cflags -no-pie -gdwarf-4 %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe -RUN: llvm-bolt %t.exe -o %t -update-debug-sections +RUN: llvm-bolt %t.exe -o %t --update-debug-sections RUN: llvm-dwarfdump -all %t | FileCheck %s # Check ranges were created/updated for asm compile unit diff --git a/bolt/test/AArch64/constant-island-alignment.s b/bolt/test/AArch64/constant-island-alignment.s index a71d7ce3eba2..3ce0df9d4f29 100644 --- a/bolt/test/AArch64/constant-island-alignment.s +++ b/bolt/test/AArch64/constant-island-alignment.s @@ -6,7 +6,7 @@ # RUN: %s -o %t.o # RUN: %clang %cflags -fPIC -pie %t.o -o %t.exe -Wl,-q \ # RUN: -nostartfiles -nodefaultlibs -Wl,-z,notext -# RUN: llvm-bolt %t.exe -o %t.bolt -use-old-text=0 -lite=0 -trap-old-code +# RUN: llvm-bolt %t.exe -o %t.bolt --use-old-text=0 --lite=0 --trap-old-code # RUN: llvm-objdump -d --disassemble-symbols='$d' %t.bolt | FileCheck %s .text diff --git a/bolt/test/AArch64/constant_island_pie_update.s b/bolt/test/AArch64/constant_island_pie_update.s index 26e4bd5df69e..f4989b9c021d 100644 --- a/bolt/test/AArch64/constant_island_pie_update.s +++ b/bolt/test/AArch64/constant_island_pie_update.s @@ -4,7 +4,7 @@ # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \ # RUN: %s -o %t.o # RUN: %clang %cflags -fPIC -pie %t.o -o %t.exe -Wl,-q -nostdlib -Wl,-z,notext -# RUN: llvm-bolt %t.exe -o %t.bolt -use-old-text=0 -lite=0 +# RUN: llvm-bolt %t.exe -o %t.bolt --use-old-text=0 --lite=0 # RUN: llvm-objdump -j .text -dR %t.bolt | FileCheck %s # CHECK: R_AARCH64_RELATIVE *ABS*+0x[[#%x,ADDR:]] diff --git a/bolt/test/AArch64/double_jump.cpp b/bolt/test/AArch64/double_jump.cpp index 1faae9840e09..d18990114da4 100644 --- a/bolt/test/AArch64/double_jump.cpp +++ b/bolt/test/AArch64/double_jump.cpp @@ -1,7 +1,7 @@ // A contrived example to test the double jump removal peephole. // RUN: %clang %cflags -O0 %s -o %t.exe -// RUN: llvm-bolt %t.exe -o %t.bolt -peepholes=double-jumps | \ +// RUN: llvm-bolt %t.exe -o %t.bolt --peepholes=double-jumps | \ // RUN: FileCheck %s -check-prefix=CHECKBOLT // RUN: llvm-objdump -d %t.bolt | FileCheck %s diff --git a/bolt/test/AArch64/ext-double-jump.s b/bolt/test/AArch64/ext-double-jump.s index a039cd424c9e..5cb1701fb11e 100644 --- a/bolt/test/AArch64/ext-double-jump.s +++ b/bolt/test/AArch64/ext-double-jump.s @@ -3,7 +3,7 @@ # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o # RUN: %clang %cflags -nostartfiles -nodefaultlibs %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -peepholes=double-jumps +# RUN: llvm-bolt %t.exe -o %t.bolt --peepholes=double-jumps .text .align 4 diff --git a/bolt/test/AArch64/go_dwarf.test b/bolt/test/AArch64/go_dwarf.test index 7cc672bc2e6f..c901835cf69a 100644 --- a/bolt/test/AArch64/go_dwarf.test +++ b/bolt/test/AArch64/go_dwarf.test @@ -3,7 +3,7 @@ # - DW_AT_high_pc is in the form of DW_FORM_addr. RUN: yaml2obj %p/Inputs/go_dwarf.yaml &> %t.exe -RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # Check the original binary values. RUN: llvm-dwarfdump -debug-info %t.exe 2>&1 | \ diff --git a/bolt/test/AArch64/plt-gnu-ld.test b/bolt/test/AArch64/plt-gnu-ld.test index 9dc37cd9b846..f8f300fecaa6 100644 --- a/bolt/test/AArch64/plt-gnu-ld.test +++ b/bolt/test/AArch64/plt-gnu-ld.test @@ -4,8 +4,8 @@ // to the symbol name e.g. memcpy@@GLIBC_2.17 // RUN: yaml2obj %p/Inputs/plt-gnu-ld.yaml &> %t.exe -// RUN: llvm-bolt %t.exe -o %t.bolt.exe -use-old-text=0 -lite=0 \ -// RUN: -print-cfg -print-only=main | FileCheck %s +// RUN: llvm-bolt %t.exe -o %t.bolt.exe --use-old-text=0 --lite=0 \ +// RUN: --print-cfg --print-only=main | FileCheck %s // CHECK: memcpy@PLT // CHECK: memset@PLT diff --git a/bolt/test/AArch64/runtime-relocs.test b/bolt/test/AArch64/runtime-relocs.test index 8f73e671cb2d..a8347b531c14 100644 --- a/bolt/test/AArch64/runtime-relocs.test +++ b/bolt/test/AArch64/runtime-relocs.test @@ -2,8 +2,8 @@ RUN: yaml2obj %p/Inputs/rels-so.yaml &> %t.so RUN: yaml2obj %p/Inputs/rels-exe.yaml &> %t.exe -RUN: llvm-bolt %t.so -o %t.bolt.so -use-old-text=0 -lite=0 -RUN: llvm-bolt %t.exe -o %t.bolt.exe -use-old-text=0 -lite=0 +RUN: llvm-bolt %t.so -o %t.bolt.so --use-old-text=0 --lite=0 +RUN: llvm-bolt %t.exe -o %t.bolt.exe --use-old-text=0 --lite=0 // Check relocations in library: @@ -27,7 +27,7 @@ CHECKEXE: {{.*}} R_AARCH64_JUMP_SLOT {{.*}} inc + 0 // the initial binary was built with gcc and ld with -mtls-dialect=trad flag. RUN: yaml2obj %p/Inputs/tls-trad.yaml &> %t.trad.so -RUN: llvm-bolt %t.trad.so -o %t.trad.bolt.so -use-old-text=0 -lite=0 +RUN: llvm-bolt %t.trad.so -o %t.trad.bolt.so --use-old-text=0 --lite=0 RUN: llvm-readelf -rW %t.trad.so | FileCheck %s -check-prefix=CHECKTRAD CHECKTRAD: {{.*}} R_AARCH64_TLS_DTPMOD64 {{.*}} t1 + 0 @@ -37,7 +37,7 @@ CHECKTRAD: {{.*}} R_AARCH64_TLS_DTPREL64 {{.*}} t1 + 0 // it is emitted correctly. RUN: yaml2obj %p/Inputs/tls-ld.yaml &> %t.ld.so -RUN: llvm-bolt %t.ld.so -o %t.ld.bolt.so -use-old-text=0 -lite=0 +RUN: llvm-bolt %t.ld.so -o %t.ld.bolt.so --use-old-text=0 --lite=0 RUN: llvm-readelf -rW %t.ld.bolt.so | FileCheck %s -check-prefix=CHECKLD CHECKLD: {{.*}} R_AARCH64_TLSDESC {{.*}} t1 + 0 diff --git a/bolt/test/AArch64/skip-got-rel.test b/bolt/test/AArch64/skip-got-rel.test index 4acf397d7bf4..3c36df00b1c8 100644 --- a/bolt/test/AArch64/skip-got-rel.test +++ b/bolt/test/AArch64/skip-got-rel.test @@ -3,6 +3,6 @@ // normally. RUN: yaml2obj %p/Inputs/skip-got-rel.yaml &> %t.exe -RUN: llvm-bolt %t.exe -o /dev/null -print-cfg -print-only=_start | FileCheck %s +RUN: llvm-bolt %t.exe -o /dev/null --print-cfg --print-only=_start | FileCheck %s CHECK: adr x0, foo2 diff --git a/bolt/test/AArch64/tailcall_traps.s b/bolt/test/AArch64/tailcall_traps.s index 26f0a3916949..95009cd784f7 100644 --- a/bolt/test/AArch64/tailcall_traps.s +++ b/bolt/test/AArch64/tailcall_traps.s @@ -3,8 +3,8 @@ # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \ # RUN: %s -o %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -peepholes=tailcall-traps \ -# RUN: -print-peepholes -funcs=foo,bar 2>&1 | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.bolt --peepholes=tailcall-traps \ +# RUN: --print-peepholes --funcs=foo,bar 2>&1 | FileCheck %s # CHECK: Binary Function "foo" # CHECK: br x0 # TAILCALL diff --git a/bolt/test/AArch64/text-data.c b/bolt/test/AArch64/text-data.c index ccba6e752c23..2986fe784007 100644 --- a/bolt/test/AArch64/text-data.c +++ b/bolt/test/AArch64/text-data.c @@ -2,7 +2,7 @@ // is properly emitted in the new section. // RUN: %clang %cflags %s -o %t.exe -Wl,-q -// RUN: llvm-bolt %t.exe -o %t.bolt -lite=0 -use-old-text=0 +// RUN: llvm-bolt %t.exe -o %t.bolt --lite=0 --use-old-text=0 // RUN: llvm-objdump -j .text -d --disassemble-symbols=arr %t.bolt | \ // RUN: FileCheck %s diff --git a/bolt/test/AArch64/unmarked-data.test b/bolt/test/AArch64/unmarked-data.test index 42de589514f7..4045e711bb00 100644 --- a/bolt/test/AArch64/unmarked-data.test +++ b/bolt/test/AArch64/unmarked-data.test @@ -1,7 +1,7 @@ // This test checks that multiple data objects in text of which only first is marked get disassembled properly // RUN: yaml2obj %S/Inputs/unmarked-data.yaml -o %t.exe -// RUN: llvm-bolt %t.exe -o %t.bolt -lite=0 -use-old-text=0 2>&1 | FileCheck %s +// RUN: llvm-bolt %t.exe -o %t.bolt --lite=0 --use-old-text=0 2>&1 | FileCheck %s // CHECK-NOT: BOLT-WARNING // RUN: llvm-objdump -j .text -d --disassemble-symbols=first,second %t.bolt | FileCheck %s -check-prefix=CHECK-SYMBOL // CHECK-SYMBOL: : diff --git a/bolt/test/AArch64/update-debug-reloc.test b/bolt/test/AArch64/update-debug-reloc.test index 873a886ae1ee..d57f42a3852a 100644 --- a/bolt/test/AArch64/update-debug-reloc.test +++ b/bolt/test/AArch64/update-debug-reloc.test @@ -2,7 +2,7 @@ # update-debug-sections option. RUN: %clang %cflags -g %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe -RUN: llvm-bolt %t.exe -o %t -update-debug-sections +RUN: llvm-bolt %t.exe -o %t --update-debug-sections CHECK: BOLT-INFO: Target architecture: aarch64 CHECK-NOT: Reloc num: 10 diff --git a/bolt/test/R_ABS.pic.lld.cpp b/bolt/test/R_ABS.pic.lld.cpp index 606ece60ba8c..e07c9d163237 100644 --- a/bolt/test/R_ABS.pic.lld.cpp +++ b/bolt/test/R_ABS.pic.lld.cpp @@ -3,7 +3,7 @@ * against _Z6myfuncv. The same address has a dynamic relocation against it. * * RUN: %clang %cflags -fPIC -shared %s -o %t.so -Wl,-q -fuse-ld=lld - * RUN: llvm-bolt %t.so -o %t.so.bolt -relocs + * RUN: llvm-bolt %t.so -o %t.so.bolt --relocs */ unsigned long long myfunc(); diff --git a/bolt/test/X86/addr32.s b/bolt/test/X86/addr32.s index ebe849c4d62f..1f926c20c7ba 100644 --- a/bolt/test/X86/addr32.s +++ b/bolt/test/X86/addr32.s @@ -3,10 +3,10 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o # RUN: ld.lld %t.o -o %t.exe -nostdlib # RUN: llvm-objdump -d %t.exe | FileCheck %s -# RUN: llvm-bolt %t.exe -o %t.out -lite=0 -x86-strip-redundant-address-size=false +# RUN: llvm-bolt %t.exe -o %t.out --lite=0 --x86-strip-redundant-address-size=false # RUN: llvm-objdump -d %t.out | FileCheck %s # CHECK: 67 e8 {{.*}} addr32 callq {{.*}} -# RUN: llvm-bolt %t.exe -o %t.out -lite=0 -x86-strip-redundant-address-size=true +# RUN: llvm-bolt %t.exe -o %t.out --lite=0 --x86-strip-redundant-address-size=true # remove test name from objdump output, to only search for addr32 in disassembly # RUN: llvm-objdump -d %t.out | grep -v addr32.s | FileCheck %s --check-prefix=CHECK-STRIP # CHECK-STRIP-NOT: addr32 diff --git a/bolt/test/X86/asm-dump.c b/bolt/test/X86/asm-dump.c index 2720bbc5d2c5..5d85e2a0a151 100644 --- a/bolt/test/X86/asm-dump.c +++ b/bolt/test/X86/asm-dump.c @@ -7,13 +7,13 @@ * RUN: %clang -fPIC %s -o %t.exe -Wl,-q * * Profile collection: instrument the binary - * RUN: llvm-bolt %t.exe -instrument -instrumentation-file=%t.fdata -o %t.instr + * RUN: llvm-bolt %t.exe --instrument --instrumentation-file=%t.fdata -o %t.instr * * Profile collection: run instrumented binary (and capture output) * RUN: %t.instr > %t.result * * Run BOLT with asm-dump - * RUN: llvm-bolt %t.exe -p %t.fdata -funcs=main -asm-dump=%t -o /dev/null \ + * RUN: llvm-bolt %t.exe -p %t.fdata --funcs=main --asm-dump=%t -o /dev/null \ * RUN: | FileCheck %s --check-prefix=CHECK-BOLT * * Check asm file contents diff --git a/bolt/test/X86/asm-func-debug.test b/bolt/test/X86/asm-func-debug.test index a8bad6e0c250..617ad6bb4622 100644 --- a/bolt/test/X86/asm-func-debug.test +++ b/bolt/test/X86/asm-func-debug.test @@ -4,7 +4,7 @@ # The input test case foo() contains nops that we remove. RUN: %clang -gdwarf-4 %cflags -no-pie %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe -RUN: llvm-bolt %t.exe -o %t -update-debug-sections +RUN: llvm-bolt %t.exe -o %t --update-debug-sections RUN: llvm-dwarfdump -all %t | FileCheck %s # Check ranges were created/updated for asm compile unit diff --git a/bolt/test/X86/avx512-trap.test b/bolt/test/X86/avx512-trap.test index 4651c676a6b0..68a0fbc8ff52 100644 --- a/bolt/test/X86/avx512-trap.test +++ b/bolt/test/X86/avx512-trap.test @@ -7,11 +7,11 @@ RUN: ld.lld %t.o -o %t -q RUN: llvm-objdump -d --disassemble-symbols=use_avx512 %t | \ RUN: FileCheck %s --check-prefix=CHECK-DIS-NO-TRAP -RUN: llvm-bolt %t -trap-avx512=1 -o %t.bolt -lite=0 2>&1 | FileCheck %s +RUN: llvm-bolt %t --trap-avx512=1 -o %t.bolt --lite=0 2>&1 | FileCheck %s RUN: llvm-objdump -d --disassemble-symbols=use_avx512 %t.bolt | \ RUN: FileCheck %s --check-prefix=CHECK-DIS -RUN: llvm-bolt %t -trap-avx512=0 -o %t.bolt -lite=0 +RUN: llvm-bolt %t --trap-avx512=0 -o %t.bolt --lite=0 RUN: llvm-objdump -d --disassemble-symbols=use_avx512 %t.bolt | \ RUN: FileCheck %s --check-prefix=CHECK-DIS-NO-TRAP diff --git a/bolt/test/X86/bb-with-two-tail-calls.s b/bolt/test/X86/bb-with-two-tail-calls.s index f23128301d51..caad7b3d735f 100644 --- a/bolt/test/X86/bb-with-two-tail-calls.s +++ b/bolt/test/X86/bb-with-two-tail-calls.s @@ -8,8 +8,8 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib -# RUN: llvm-bolt %t.exe -o %t.out -data %t.fdata -lite=0 -dyno-stats \ -# RUN: -print-sctc -print-only=_start 2>&1 | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --lite=0 --dyno-stats \ +# RUN: --print-sctc --print-only=_start 2>&1 | FileCheck %s # CHECK-NOT: Assertion `BranchInfo.size() == 2 && "could only be called for blocks with 2 successors"' failed. # Two tail calls in the same basic block after SCTC: # CHECK: {{.*}}: ja {{.*}} # TAILCALL # CTCTakenCount: {{.*}} diff --git a/bolt/test/X86/block-reordering.test b/bolt/test/X86/block-reordering.test index 800e7a76bb61..a18a2109d37e 100644 --- a/bolt/test/X86/block-reordering.test +++ b/bolt/test/X86/block-reordering.test @@ -2,9 +2,9 @@ # according to the new function layout. RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe -RUN: llvm-bolt %t.exe -o /dev/null -data %p/Inputs/blarge.fdata \ -RUN: -reorder-blocks=normal -print-finalized 2>&1 | FileCheck %s \ -RUN: -check-prefix=CHECK +RUN: llvm-bolt %t.exe -o /dev/null --data %p/Inputs/blarge.fdata \ +RUN: --reorder-blocks=normal --print-finalized 2>&1 | FileCheck %s \ +RUN: --check-prefix=CHECK CHECK: Binary Function "usqrt" CHECK: BB Layout : .LBB{{.*}}, .Ltmp{{.*}}, .Ltmp{{.*}}, .LFT{{.*}}, .LFT{{.*}} diff --git a/bolt/test/X86/branch-data.test b/bolt/test/X86/branch-data.test index e069ecd7a7c0..24f90f2d8f5e 100644 --- a/bolt/test/X86/branch-data.test +++ b/bolt/test/X86/branch-data.test @@ -3,7 +3,7 @@ # Also checks that llvm-bolt disassembler and CFG builder is working properly. RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe -RUN: llvm-bolt %t.exe -o /dev/null -data %p/Inputs/blarge.fdata -print-cfg +RUN: llvm-bolt %t.exe -o /dev/null --data %p/Inputs/blarge.fdata --print-cfg CHECK: Binary Function "usqrt" CHECK: State : CFG constructed diff --git a/bolt/test/X86/bug-reorder-bb-jrcxz.s b/bolt/test/X86/bug-reorder-bb-jrcxz.s index 1605f510adc8..27cd38bc8306 100644 --- a/bolt/test/X86/bug-reorder-bb-jrcxz.s +++ b/bolt/test/X86/bug-reorder-bb-jrcxz.s @@ -14,10 +14,10 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: %clang %cflags %t.o -falign-labels -march=native -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolted -data %t.fdata \ -# RUN: -reorder-blocks=ext-tsp -reorder-functions=hfsort \ -# RUN: -split-functions=2 -split-all-cold -split-eh -dyno-stats \ -# RUN: -print-finalized 2>&1 | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.bolted --data %t.fdata \ +# RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort \ +# RUN: --split-functions=2 --split-all-cold --split-eh --dyno-stats \ +# RUN: --print-finalized 2>&1 | FileCheck %s # CHECK-NOT: value of -2105 is too large for field of 1 byte. diff --git a/bolt/test/X86/cfi-expr-rewrite.s b/bolt/test/X86/cfi-expr-rewrite.s index 62d5694fba38..27628190c660 100644 --- a/bolt/test/X86/cfi-expr-rewrite.s +++ b/bolt/test/X86/cfi-expr-rewrite.s @@ -3,7 +3,7 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o # RUN: %clang %cflags %t.o -o %t.exe -# RUN: llvm-bolt %t.exe -o %t && llvm-dwarfdump -eh-frame %t | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t && llvm-dwarfdump --eh-frame %t | FileCheck %s # # CHECK: DW_CFA_advance_loc: 5 # CHECK-NEXT: DW_CFA_def_cfa: R10 +0 diff --git a/bolt/test/X86/cfi-instrs-count.s b/bolt/test/X86/cfi-instrs-count.s index c74e940a41f8..adf28a9e0811 100644 --- a/bolt/test/X86/cfi-instrs-count.s +++ b/bolt/test/X86/cfi-instrs-count.s @@ -3,7 +3,7 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o # RUN: %clang %cflags %t.o -o %t.exe -# RUN: llvm-bolt %t.exe -o /dev/null -print-cfg 2>&1 | FileCheck %s +# RUN: llvm-bolt %t.exe -o /dev/null --print-cfg 2>&1 | FileCheck %s # # CHECK: Binary Function "_Z7catchitv" after building cfg { # CHECK: CFI Instrs : 6 diff --git a/bolt/test/X86/cfi-instrs-reordered.s b/bolt/test/X86/cfi-instrs-reordered.s index a5c96b376cbc..8b2fe512f392 100644 --- a/bolt/test/X86/cfi-instrs-reordered.s +++ b/bolt/test/X86/cfi-instrs-reordered.s @@ -4,8 +4,8 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clangxx %cflags %t.o -o %t.exe -# RUN: llvm-bolt %t.exe -o %t -reorder-blocks=cache -print-after-lowering \ -# RUN: -print-only=_Z10SolveCubicddddPiPd 2>&1 | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t --reorder-blocks=cache --print-after-lowering \ +# RUN: --print-only=_Z10SolveCubicddddPiPd 2>&1 | FileCheck %s # # Entry BB # CHECK: divsd %xmm0, %xmm1 diff --git a/bolt/test/X86/cmov-conversion.s b/bolt/test/X86/cmov-conversion.s index b8766002b151..ed7aac8bc5be 100644 --- a/bolt/test/X86/cmov-conversion.s +++ b/bolt/test/X86/cmov-conversion.s @@ -4,9 +4,9 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib -# RUN: llvm-bolt %t.exe -data %t.fdata -o %t -lite=0 -v=2 \ -# RUN: -cmov-conversion -cmov-conversion-misprediction-threshold=-1 \ -# RUN: -cmov-conversion-bias-threshold=-1 -print-all | FileCheck %s +# RUN: llvm-bolt %t.exe --data %t.fdata -o %t --lite=0 -v=2 \ +# RUN: --cmov-conversion --cmov-conversion-misprediction-threshold=-1 \ +# RUN: --cmov-conversion-bias-threshold=-1 --print-all | FileCheck %s # CHECK: BOLT-INFO: CMOVConversion: CmovInHotPath, converted static 1/1 # CHECK: BOLT-INFO: CMOVConversion: CmovNotInHotPath, converted static 1/1 # CHECK: BOLT-INFO: CMOVConversion: MaxIndex, converted static 1/1 diff --git a/bolt/test/X86/ctc-and-unreachable.test b/bolt/test/X86/ctc-and-unreachable.test index aab01d6b1cf9..0a0b7fcff4ce 100644 --- a/bolt/test/X86/ctc-and-unreachable.test +++ b/bolt/test/X86/ctc-and-unreachable.test @@ -2,7 +2,7 @@ # a fall-through to a next function (result of builtin_unreachable()). RUN: %clang %cflags %p/Inputs/ctc_and_unreachable.s -o %t.exe -Wl,-q -RUN: llvm-bolt %t.exe -o %t -print-after-lowering -print-only=foo 2>&1 | FileCheck %s +RUN: llvm-bolt %t.exe -o %t --print-after-lowering --print-only=foo 2>&1 | FileCheck %s CHECK: Binary Function "foo" CHECK: cmpq $0x1, %rdi diff --git a/bolt/test/X86/data-to-data-pcrel.s b/bolt/test/X86/data-to-data-pcrel.s index 079db8717707..256682655d6d 100644 --- a/bolt/test/X86/data-to-data-pcrel.s +++ b/bolt/test/X86/data-to-data-pcrel.s @@ -4,7 +4,7 @@ # RUN: llvm-strip --strip-unneeded %t.o # RUN: ld.lld %t.o -o %t.exe -q --unresolved-symbols=ignore-all # RUN: llvm-readelf -Wr %t.exe | FileCheck %s -# RUN: llvm-bolt -strict %t.exe -relocs -o /dev/null +# RUN: llvm-bolt --strict %t.exe --relocs -o /dev/null .text .globl _start diff --git a/bolt/test/X86/debug-fission-single.s b/bolt/test/X86/debug-fission-single.s index d1a050491b61..fe0308902ec6 100644 --- a/bolt/test/X86/debug-fission-single.s +++ b/bolt/test/X86/debug-fission-single.s @@ -43,7 +43,7 @@ # CHECK-ADDR-SEC: 0x00000000: Addrs: [ # CHECK-ADDR-SEC: 0x0000000000601000 -# RUN: llvm-bolt %t.exe --reorder-blocks=reverse -update-debug-sections -dwarf-output-path=%T -o %t.bolt.2.exe --write-dwp=true +# RUN: llvm-bolt %t.exe --reorder-blocks=reverse --update-debug-sections --dwarf-output-path=%T -o %t.bolt.2.exe --write-dwp=true # RUN: not llvm-dwarfdump --show-form --verbose --debug-info %t.bolt.2.exe.dwp &> %tAddrIndexTestDwp # RUN: cat %tAddrIndexTestDwp | FileCheck %s --check-prefix=CHECK-DWP-DEBUG diff --git a/bolt/test/X86/double-jump.test b/bolt/test/X86/double-jump.test index eb3e9ec3b748..fa2271bbb743 100644 --- a/bolt/test/X86/double-jump.test +++ b/bolt/test/X86/double-jump.test @@ -1,8 +1,8 @@ # Test the double jump removqal peephole. RUN: %clang %cflags %p/Inputs/double_jump.cpp -o %t.exe -RUN: (llvm-bolt %t.exe -peepholes=double-jumps \ -RUN: -eliminate-unreachable -o %t 2>&1 \ +RUN: (llvm-bolt %t.exe --peepholes=double-jumps \ +RUN: --eliminate-unreachable -o %t 2>&1 \ RUN: && llvm-objdump -d %t --print-imm-hex --no-show-raw-insn) | FileCheck %s CHECK: BOLT-INFO: Peephole: 1 double jumps patched. diff --git a/bolt/test/X86/double-rel.s b/bolt/test/X86/double-rel.s index 6a4721a6c23c..2b6ac93cb191 100644 --- a/bolt/test/X86/double-rel.s +++ b/bolt/test/X86/double-rel.s @@ -6,7 +6,7 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o # RUN: ld.lld %t.o -o %t.exe -q --Tdata=0x80000 -# RUN: llvm-bolt %t.exe -relocs -o /dev/null -print-only=_start -print-disasm \ +# RUN: llvm-bolt %t.exe --relocs -o /dev/null --print-only=_start --print-disasm \ # RUN: | FileCheck %s --check-prefix=CHECK-BOLT # RUN: llvm-objdump -d --print-imm-hex %t.exe \ # RUN: | FileCheck %s --check-prefix=CHECK-OBJDUMP diff --git a/bolt/test/X86/dwarf-handle-visit-loclist-error.s b/bolt/test/X86/dwarf-handle-visit-loclist-error.s index 1d9acf9fc171..d5ba74fb6016 100644 --- a/bolt/test/X86/dwarf-handle-visit-loclist-error.s +++ b/bolt/test/X86/dwarf-handle-visit-loclist-error.s @@ -4,7 +4,7 @@ # RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o # RUN: %clang %cflags -dwarf-4 %t1.o -o %t.exe # RUN: llvm-objcopy --remove-section=.debug_loc %t.exe -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections &> file +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections &> file # RUN: cat file | FileCheck --check-prefix=CHECK %s # Making sure we handle error returned by visitLocationList correctly. diff --git a/bolt/test/X86/dwarf4-ftypes-dwo-input-dwp-output.test b/bolt/test/X86/dwarf4-ftypes-dwo-input-dwp-output.test index 5daae95075e2..8fd2f1950437 100644 --- a/bolt/test/X86/dwarf4-ftypes-dwo-input-dwp-output.test +++ b/bolt/test/X86/dwarf4-ftypes-dwo-input-dwp-output.test @@ -6,7 +6,7 @@ ; RUN: --filetype=obj %p/Inputs/dwarf4-ftypes-split-dwarf.s -o=main.o ; RUN: %clang %cflags -gdwarf-4 -gsplit-dwarf=split main.o -o main.exe ; RUN: llvm-dwarfdump --show-form --verbose --debug-types main.dwo | FileCheck -check-prefix=PRE-BOLT %s -; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections -write-dwp +; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --write-dwp ; RUN: llvm-dwarfdump --show-form --verbose --debug-types main.exe.bolt.dwp | FileCheck -check-prefix=BOLT %s ; RUN: llvm-dwarfdump --show-form --verbose --debug-tu-index main.exe.bolt.dwp | FileCheck -check-prefix=BOLT-DWP-TU-INDEX %s diff --git a/bolt/test/X86/dwarf4-ftypes-dwp-input-dwp-output.test b/bolt/test/X86/dwarf4-ftypes-dwp-input-dwp-output.test index 125cf6342418..52c13a0d66cf 100644 --- a/bolt/test/X86/dwarf4-ftypes-dwp-input-dwp-output.test +++ b/bolt/test/X86/dwarf4-ftypes-dwp-input-dwp-output.test @@ -8,7 +8,7 @@ ; RUN: llvm-dwp -e main.exe -o main.exe.dwp ; RUN: llvm-dwarfdump --show-form --verbose --debug-types main.exe.dwp | FileCheck -check-prefix=PRE-BOLT %s ; RUN: llvm-dwarfdump --show-form --verbose --debug-tu-index main.exe.dwp | FileCheck -check-prefix=PRE-BOLT-DWP-TU-INDEX %s -; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections -write-dwp +; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --write-dwp ; RUN: llvm-dwarfdump --show-form --verbose --debug-types main.exe.bolt.dwp | FileCheck -check-prefix=BOLT %s ; RUN: llvm-dwarfdump --show-form --verbose --debug-tu-index main.exe.bolt.dwp | FileCheck -check-prefix=BOLT-DWP-TU-INDEX %s diff --git a/bolt/test/X86/dwarf5-debug-info-dwarf4-debug-line.s b/bolt/test/X86/dwarf5-debug-info-dwarf4-debug-line.s index 4e7e7cd7b4b7..6042bbee8948 100644 --- a/bolt/test/X86/dwarf5-debug-info-dwarf4-debug-line.s +++ b/bolt/test/X86/dwarf5-debug-info-dwarf4-debug-line.s @@ -2,7 +2,7 @@ # RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o # RUN: %clang %cflags -dwarf-5 %t1.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # RUN: llvm-dwarfdump --show-form --verbose --debug-line %t.exe | FileCheck --check-prefix=PRECHECK %s # RUN: llvm-dwarfdump --show-form --verbose --debug-line %t.bolt | FileCheck --check-prefix=POSTCHECK %s diff --git a/bolt/test/X86/dwarf5-debug-line.s b/bolt/test/X86/dwarf5-debug-line.s index ec7d4c169164..5b1cdba712a9 100644 --- a/bolt/test/X86/dwarf5-debug-line.s +++ b/bolt/test/X86/dwarf5-debug-line.s @@ -2,7 +2,7 @@ # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o # RUN: %clang %cflags -dwarf-5 %t1.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # RUN: llvm-dwarfdump --show-form --verbose --debug-line %t.exe | FileCheck --check-prefix=PRECHECK %s # RUN: llvm-dwarfdump --show-form --verbose --debug-line %t.bolt | FileCheck --check-prefix=POSTCHECK %s diff --git a/bolt/test/X86/dwarf5-debug-loclists.s b/bolt/test/X86/dwarf5-debug-loclists.s index 440e94115701..97fa5b828e7f 100644 --- a/bolt/test/X86/dwarf5-debug-loclists.s +++ b/bolt/test/X86/dwarf5-debug-loclists.s @@ -2,7 +2,7 @@ # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o # RUN: %clang %cflags -dwarf-5 %t1.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s # RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt > %t.txt # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t.txt diff --git a/bolt/test/X86/dwarf5-label-low-pc.s b/bolt/test/X86/dwarf5-label-low-pc.s index fbcbbe052437..b71309716334 100644 --- a/bolt/test/X86/dwarf5-label-low-pc.s +++ b/bolt/test/X86/dwarf5-label-low-pc.s @@ -3,7 +3,7 @@ # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %s -o %tmain.o # RUN: %clang %cflags -dwarf-5 %tmain.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s # RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt > %t.txt diff --git a/bolt/test/X86/dwarf5-locexpr-addrx.s b/bolt/test/X86/dwarf5-locexpr-addrx.s index 0e1d1a5c978d..c78c5f0cedb9 100644 --- a/bolt/test/X86/dwarf5-locexpr-addrx.s +++ b/bolt/test/X86/dwarf5-locexpr-addrx.s @@ -2,7 +2,7 @@ # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %s -o %tmain.o # RUN: %clang %cflags -dwarf-5 %tmain.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s diff --git a/bolt/test/X86/dwarf5-loclist-offset-form.test b/bolt/test/X86/dwarf5-loclist-offset-form.test index e0874164d5de..07c29cd64176 100644 --- a/bolt/test/X86/dwarf5-loclist-offset-form.test +++ b/bolt/test/X86/dwarf5-loclist-offset-form.test @@ -3,7 +3,7 @@ # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-loclist-offset-form-main.s -o %tmain.o # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-loclist-offset-form-helper.s -o %thelper.o # RUN: %clang %cflags -dwarf-5 %tmain.o %thelper.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s # RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt > %t.txt # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t.txt diff --git a/bolt/test/X86/dwarf5-lowpc-highpc-convert.s b/bolt/test/X86/dwarf5-lowpc-highpc-convert.s index 25778131aa47..4bb2b4837448 100644 --- a/bolt/test/X86/dwarf5-lowpc-highpc-convert.s +++ b/bolt/test/X86/dwarf5-lowpc-highpc-convert.s @@ -2,7 +2,7 @@ # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o # RUN: %clang %cflags -dwarf-5 %t1.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s # RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt > %t.txt # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t.txt diff --git a/bolt/test/X86/dwarf5-rangeoffset-to-rangeindex.s b/bolt/test/X86/dwarf5-rangeoffset-to-rangeindex.s index 94f01fcc6edc..0b32a373a9b8 100644 --- a/bolt/test/X86/dwarf5-rangeoffset-to-rangeindex.s +++ b/bolt/test/X86/dwarf5-rangeoffset-to-rangeindex.s @@ -2,7 +2,7 @@ # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o # RUN: %clang %cflags -dwarf-5 %t1.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s # RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt > %t.txt # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t.txt diff --git a/bolt/test/X86/dwarf5-two-loclists.test b/bolt/test/X86/dwarf5-two-loclists.test index 54194b46ee5c..566f63abbf73 100644 --- a/bolt/test/X86/dwarf5-two-loclists.test +++ b/bolt/test/X86/dwarf5-two-loclists.test @@ -3,7 +3,7 @@ # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5_main.s -o %tmain.o # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5_helper.s -o %thelper.o # RUN: %clang %cflags -dwarf-5 %tmain.o %thelper.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s # RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt > %t.txt # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t.txt diff --git a/bolt/test/X86/dwarf5-two-rnglists.test b/bolt/test/X86/dwarf5-two-rnglists.test index bbf3ab642b1f..936a216a0ec2 100644 --- a/bolt/test/X86/dwarf5-two-rnglists.test +++ b/bolt/test/X86/dwarf5-two-rnglists.test @@ -3,7 +3,7 @@ # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5_main.s -o %tmain.o # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5_helper.s -o %thelper.o # RUN: %clang %cflags -dwarf-5 %tmain.o %thelper.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s # RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt > %t.txt # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t.txt diff --git a/bolt/test/X86/exceptions-args.test b/bolt/test/X86/exceptions-args.test index cfcd148fc55d..fe9423896f68 100644 --- a/bolt/test/X86/exceptions-args.test +++ b/bolt/test/X86/exceptions-args.test @@ -3,7 +3,7 @@ RUN: %clang %cflags %p/../Inputs/stub.c -fPIC -pie -shared -o %t.so RUN: %clangxx %cxxflags -no-pie %p/Inputs/exc_args.s -o %t %t.so -Wl,-z,notext -RUN: llvm-bolt %t -o /dev/null -print-finalized -print-only=main | FileCheck %s +RUN: llvm-bolt %t -o /dev/null --print-finalized --print-only=main | FileCheck %s CHECK: Binary Function "main" after finalize-functions CHECK: callq _Z3fooiiiiiiii {{.*}} GNU_args_size = 16 diff --git a/bolt/test/X86/fallthrough-to-noop.test b/bolt/test/X86/fallthrough-to-noop.test index 3f623ddd765d..909af8ff423a 100644 --- a/bolt/test/X86/fallthrough-to-noop.test +++ b/bolt/test/X86/fallthrough-to-noop.test @@ -6,8 +6,8 @@ RUN: %S/Inputs/ft_to_noop.s -o %t.o RUN: link_fdata %S/Inputs/ft_to_noop.s %t.o %t.fdata --nmtool llvm-nm RUN: llvm-strip --strip-unneeded %t.o RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -RUN: llvm-bolt %t.exe -o %t -data %t.fdata \ -RUN: -print-cfg -sequential-disassembly 2>&1 | FileCheck %s +RUN: llvm-bolt %t.exe -o %t --data %t.fdata \ +RUN: --print-cfg --sequential-disassembly 2>&1 | FileCheck %s CHECK: Binary Function "foo" after building cfg CHECK: Exec Count : 20 diff --git a/bolt/test/X86/false-jump-table.s b/bolt/test/X86/false-jump-table.s index 8f969b7ec822..8cb87ed821e0 100755 --- a/bolt/test/X86/false-jump-table.s +++ b/bolt/test/X86/false-jump-table.s @@ -7,8 +7,8 @@ # RUN: %s -o %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -print-cfg \ -# RUN: -print-only=inc_dup -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --print-cfg \ +# RUN: --print-only=inc_dup -o %t.out | FileCheck %s .file "jump_table.c" .section .rodata diff --git a/bolt/test/X86/fptr-addend-pcrel.s b/bolt/test/X86/fptr-addend-pcrel.s index 722f20ed5157..0e84a8fd3600 100644 --- a/bolt/test/X86/fptr-addend-pcrel.s +++ b/bolt/test/X86/fptr-addend-pcrel.s @@ -6,7 +6,7 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o # RUN: llvm-strip --strip-unneeded %t.o # RUN: ld.lld %t.o -o %t.exe -q -# RUN: llvm-bolt %t.exe -relocs -o /dev/null -print-only=foo -print-disasm \ +# RUN: llvm-bolt %t.exe --relocs -o /dev/null --print-only=foo --print-disasm \ # RUN: | FileCheck %s .text diff --git a/bolt/test/X86/gdbindex.test b/bolt/test/X86/gdbindex.test index f954c9078f40..36c22260e265 100644 --- a/bolt/test/X86/gdbindex.test +++ b/bolt/test/X86/gdbindex.test @@ -1,7 +1,7 @@ RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %p/Inputs/dwarfdump-gdbindex.s -o %t.o RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %p/Inputs/dwarfdump-gdbindex2.s -o %t2.o RUN: ld.lld --gdb-index %t.o %t2.o -o %tfile.exe -RUN: llvm-bolt %tfile.exe -o %tfile.exe.bolt -update-debug-sections +RUN: llvm-bolt %tfile.exe -o %tfile.exe.bolt --update-debug-sections RUN: llvm-dwarfdump -gdb-index %tfile.exe.bolt | FileCheck %s ; test.cpp: diff --git a/bolt/test/X86/gotpcrelx.s b/bolt/test/X86/gotpcrelx.s index 4f99453d26a7..00937e43effe 100644 --- a/bolt/test/X86/gotpcrelx.s +++ b/bolt/test/X86/gotpcrelx.s @@ -10,11 +10,11 @@ # RUN: ld.lld %t.o -o %t.exe -q # RUN: ld.lld %t.o -o %t.pie.exe -q -pie # RUN: ld.lld %t.o -o %t.no-relax.exe -q --no-relax -# RUN: llvm-bolt %t.exe -relocs -o %t.out -print-cfg -print-only=_start \ +# RUN: llvm-bolt %t.exe --relocs -o %t.out --print-cfg --print-only=_start \ # RUN: |& FileCheck --check-prefix=BOLT %s -# RUN: llvm-bolt %t.pie.exe -o /dev/null -print-cfg -print-only=_start \ +# RUN: llvm-bolt %t.pie.exe -o /dev/null --print-cfg --print-only=_start \ # RUN: |& FileCheck --check-prefix=PIE-BOLT %s -# RUN: llvm-bolt %t.no-relax.exe -o /dev/null -print-cfg -print-only=_start \ +# RUN: llvm-bolt %t.no-relax.exe -o /dev/null --print-cfg --print-only=_start \ # RUN: |& FileCheck --check-prefix=NO-RELAX-BOLT %s # RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex \ # RUN: %t.out | FileCheck --check-prefix=DISASM %s diff --git a/bolt/test/X86/high_pc_udata.s b/bolt/test/X86/high_pc_udata.s index 18db02a5ad8d..998058df0b05 100644 --- a/bolt/test/X86/high_pc_udata.s +++ b/bolt/test/X86/high_pc_udata.s @@ -2,7 +2,7 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o # RUN: %clang %cflags %t1.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s diff --git a/bolt/test/X86/icf-jump-tables.test b/bolt/test/X86/icf-jump-tables.test index 50c080021d44..41820008b013 100644 --- a/bolt/test/X86/icf-jump-tables.test +++ b/bolt/test/X86/icf-jump-tables.test @@ -4,7 +4,7 @@ # REQUIRES: system-linux # RUN: %clang %cflags -O1 -g %p/../Inputs/icf-jump-tables.c -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -icf -o %t.bolt |& FileCheck %s +# RUN: llvm-bolt %t.exe --icf -o %t.bolt |& FileCheck %s ## Check that BOLT successfully folded a function with jump table: # CHECK: ICF folded {{.*}}. {{[^0]}} functions had jump tables. diff --git a/bolt/test/X86/indirect-goto.test b/bolt/test/X86/indirect-goto.test index fcd0d761ab0a..e2565ff88932 100644 --- a/bolt/test/X86/indirect-goto.test +++ b/bolt/test/X86/indirect-goto.test @@ -1,6 +1,7 @@ # Check llvm-bolt processes binaries compiled from sources that use indirect goto. RUN: %clang %cflags -no-pie %S/Inputs/indirect_goto.c -Wl,-q -o %t -RUN: llvm-bolt %t -o /dev/null -relocs=1 -print-cfg -print-only=main -strict \ +RUN: llvm-bolt %t -o /dev/null --relocs=1 --print-cfg --print-only=main \ +RUN: --strict \ RUN: 2>&1 | FileCheck %s # Check that all possible destinations are included as successors. diff --git a/bolt/test/X86/inline-debug-info.test b/bolt/test/X86/inline-debug-info.test index 950245c7cb7d..e20e5e31ed9d 100644 --- a/bolt/test/X86/inline-debug-info.test +++ b/bolt/test/X86/inline-debug-info.test @@ -5,8 +5,9 @@ # RUN: %clang %cflags -O1 -g %p/Inputs/inline-main.c %p/Inputs/inline-foo.c \ # RUN: -I%p/../Inputs -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -update-debug-sections -print-debug-info \ -# RUN: -print-only=main -print-after-lowering -force-inline=foo -o %t.bolt \ +# RUN: llvm-bolt %t.exe --update-debug-sections --print-debug-info \ +# RUN: --print-only=main --print-after-lowering --force-inline=foo \ +# RUN: -o %t.bolt \ # RUN: | FileCheck %s ## The call to puts() should come from inline-foo.c: diff --git a/bolt/test/X86/inlined-function-mixed.test b/bolt/test/X86/inlined-function-mixed.test index 728e3b82e094..5a87bdde9535 100644 --- a/bolt/test/X86/inlined-function-mixed.test +++ b/bolt/test/X86/inlined-function-mixed.test @@ -5,7 +5,7 @@ RUN: %clangxx %cxxflags %S/Inputs/inlined.cpp -c -o %T/inlined.o RUN: %clangxx %cxxflags %S/Inputs/inlinee.cpp -c -o %T/inlinee.o -g RUN: %clangxx %cxxflags %T/inlined.o %T/inlinee.o -o %t -RUN: llvm-bolt %t -o %t.bolt -update-debug-sections -reorder-blocks=reverse \ -RUN: -inline-small-functions -force-inline=main | FileCheck %s +RUN: llvm-bolt %t -o %t.bolt --update-debug-sections --reorder-blocks=reverse \ +RUN: --inline-small-functions --force-inline=main | FileCheck %s CHECK-NOT: BOLT: 0 out of {{.*}} functions were overwritten diff --git a/bolt/test/X86/insert-addr-rnglists_base.s b/bolt/test/X86/insert-addr-rnglists_base.s index 76ba7917a727..800bed27243d 100644 --- a/bolt/test/X86/insert-addr-rnglists_base.s +++ b/bolt/test/X86/insert-addr-rnglists_base.s @@ -2,7 +2,7 @@ # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o # RUN: %clang %cflags -dwarf-5 %t1.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -update-debug-sections +# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s diff --git a/bolt/test/X86/internal-call-instrument-so.s b/bolt/test/X86/internal-call-instrument-so.s index 67a6e4ec6478..b8903fc7f822 100644 --- a/bolt/test/X86/internal-call-instrument-so.s +++ b/bolt/test/X86/internal-call-instrument-so.s @@ -6,7 +6,7 @@ # Delete our BB symbols so BOLT doesn't mark them as entry points # RUN: llvm-strip --strip-unneeded %t.o # RUN: ld.lld %t.o -o %t.exe -q -shared -fini=_fini -# RUN: llvm-bolt -instrument %t.exe -relocs -o %t.out +# RUN: llvm-bolt --instrument %t.exe --relocs -o %t.out .text .globl _start diff --git a/bolt/test/X86/internal-call-instrument.s b/bolt/test/X86/internal-call-instrument.s index 9915049210f3..c13717472be4 100644 --- a/bolt/test/X86/internal-call-instrument.s +++ b/bolt/test/X86/internal-call-instrument.s @@ -7,7 +7,7 @@ # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt -instrument %t.exe -relocs -o %t.out +# RUN: llvm-bolt --instrument %t.exe --relocs -o %t.out .text .globl main diff --git a/bolt/test/X86/interprocedural-ref-entry-point.s b/bolt/test/X86/interprocedural-ref-entry-point.s index 5ff5ca265f4b..0e1cca5c9bfe 100644 --- a/bolt/test/X86/interprocedural-ref-entry-point.s +++ b/bolt/test/X86/interprocedural-ref-entry-point.s @@ -19,7 +19,8 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o # RUN: %clangxx %cxxflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.out -dump-dot-all -funcs=main.* 2>&1 | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.out --dump-dot-all --funcs=main.* \ +# RUN: 2>&1 | FileCheck %s # # CHECK-NOT: Assertion `isValid()' failed. diff --git a/bolt/test/X86/issue20.s b/bolt/test/X86/issue20.s index 8894f816c4fd..ea57df1f92a8 100755 --- a/bolt/test/X86/issue20.s +++ b/bolt/test/X86/issue20.s @@ -7,7 +7,7 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \ # RUN: %s -o %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -# RUN: llvm-bolt %t.exe -relocs=0 -jump-tables=move -print-finalized \ +# RUN: llvm-bolt %t.exe --relocs=0 --jump-tables=move --print-finalized \ # RUN: -o %t.out | FileCheck %s # CHECK: BOLT-INFO: UCE removed 0 blocks and 0 bytes of code. diff --git a/bolt/test/X86/issue20.test b/bolt/test/X86/issue20.test index de9c39b947da..d01a3bf0380a 100755 --- a/bolt/test/X86/issue20.test +++ b/bolt/test/X86/issue20.test @@ -3,7 +3,7 @@ # in a JT" # RUN: yaml2obj %p/Inputs/issue20.yaml &> %t.exe -# RUN: llvm-bolt %t.exe -relocs=0 -jump-tables=move -print-finalized \ +# RUN: llvm-bolt %t.exe --relocs=0 --jump-tables=move --print-finalized \ # RUN: -o %t.out | FileCheck %s CHECK: BOLT-INFO: UCE removed 0 blocks and 0 bytes of code. diff --git a/bolt/test/X86/issue26.s b/bolt/test/X86/issue26.s index bf383eb47bbe..a6e38b6e4cef 100755 --- a/bolt/test/X86/issue26.s +++ b/bolt/test/X86/issue26.s @@ -7,7 +7,7 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \ # RUN: %s -o %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -relocs -print-cfg -o %t.out \ +# RUN: llvm-bolt %t.exe --relocs --print-cfg -o %t.out \ # RUN: | FileCheck %s # CHECK-NOT: BOLT-WARNING: CFG invalid in XYZ @ .LBB0 diff --git a/bolt/test/X86/issue26.test b/bolt/test/X86/issue26.test index 423edd3a35d2..5bf25e6a59ba 100755 --- a/bolt/test/X86/issue26.test +++ b/bolt/test/X86/issue26.test @@ -1,7 +1,7 @@ # This reproduces issue 26 from our github repo # RUN: yaml2obj %p/Inputs/issue26.yaml &> %t.exe -# RUN: llvm-bolt %t.exe -relocs -print-cfg -o %t.out \ +# RUN: llvm-bolt %t.exe --relocs --print-cfg -o %t.out \ # RUN: | FileCheck %s CHECK-NOT: BOLT-WARNING: CFG invalid in XYZ @ .LBB0 diff --git a/bolt/test/X86/jmpjmp.test b/bolt/test/X86/jmpjmp.test index 81817f95f184..b512001c3c44 100644 --- a/bolt/test/X86/jmpjmp.test +++ b/bolt/test/X86/jmpjmp.test @@ -3,7 +3,7 @@ RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %S/Inputs/jmpjmp.s -o %t.o RUN: %clang %cflags %t.o -o %t.exe -RUN: llvm-bolt %t.exe -o /dev/null -print-cfg 2>&1 | FileCheck %s +RUN: llvm-bolt %t.exe -o /dev/null --print-cfg 2>&1 | FileCheck %s CHECK: Binary Function "testfunc" CHECK: State : CFG constructed diff --git a/bolt/test/X86/jump-table-footprint-reduction.test b/bolt/test/X86/jump-table-footprint-reduction.test index 3bfc97da577d..5a007c626eca 100644 --- a/bolt/test/X86/jump-table-footprint-reduction.test +++ b/bolt/test/X86/jump-table-footprint-reduction.test @@ -6,8 +6,8 @@ RUN: %S/Inputs/jump_table_footprint_reduction.s -o %t.o RUN: link_fdata %S/Inputs/jump_table_footprint_reduction.s %t.o %t.fdata --nmtool llvm-nm RUN: llvm-strip --strip-unneeded %t.o RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -RUN: llvm-bolt %t.exe -data %t.fdata -o /dev/null \ -RUN: -jump-tables=move -jt-footprint-reduction -assume-abi -relocs \ +RUN: llvm-bolt %t.exe --data %t.fdata -o /dev/null \ +RUN: --jump-tables=move --jt-footprint-reduction --assume-abi --relocs \ RUN: | FileCheck %s CHECK: 100.00% of dynamic JT entries were reduced. diff --git a/bolt/test/X86/jump-table-icp.test b/bolt/test/X86/jump-table-icp.test index a48d18c5d80f..0deeba459cda 100644 --- a/bolt/test/X86/jump-table-icp.test +++ b/bolt/test/X86/jump-table-icp.test @@ -4,14 +4,14 @@ RUN: link_fdata %p/Inputs/jump_table_icp.s %t.o %t.fdata --nmtool llvm-nm RUN: llvm-strip --strip-unneeded %t.o RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -RUN: (llvm-bolt %t.exe -data %t.fdata -o %t -relocs \ -RUN: -reorder-blocks=cache -split-functions=3 -split-all-cold \ -RUN: -use-gnu-stack -dyno-stats -indirect-call-promotion=jump-tables \ -RUN: -print-icp -v=0 \ -RUN: -icp-jt-remaining-percent-threshold=10 \ -RUN: -icp-jt-total-percent-threshold=2 \ -RUN: -indirect-call-promotion-topn=1 \ -RUN: -icp-jump-tables-targets -align-functions-max-bytes=7 2>&1 && \ +RUN: (llvm-bolt %t.exe --data %t.fdata -o %t --relocs \ +RUN: --reorder-blocks=cache --split-functions=3 --split-all-cold \ +RUN: --use-gnu-stack --dyno-stats --indirect-call-promotion=jump-tables \ +RUN: --print-icp -v=0 \ +RUN: --icp-jt-remaining-percent-threshold=10 \ +RUN: --icp-jt-total-percent-threshold=2 \ +RUN: --indirect-call-promotion-topn=1 \ +RUN: --icp-jump-tables-targets --align-functions-max-bytes=7 2>&1 && \ RUN: llvm-objdump -d %t --print-imm-hex) | FileCheck %s BOLT-INFO: ICP total indirect callsites = 0 diff --git a/bolt/test/X86/jump-table-pic-order.test b/bolt/test/X86/jump-table-pic-order.test index 5edf9bf24744..0206e831f244 100644 --- a/bolt/test/X86/jump-table-pic-order.test +++ b/bolt/test/X86/jump-table-pic-order.test @@ -2,7 +2,7 @@ # in the same order as they appear in the input code. RUN: %clang %cflags %S/Inputs/jump-table-pic.s -o %t.exe -Wl,-q -RUN: llvm-bolt %t.exe -strict -print-cfg -print-only=main -o /dev/null \ +RUN: llvm-bolt %t.exe --strict --print-cfg --print-only=main -o /dev/null \ RUN: | FileCheck %s CHECK: BB Layout : {{.*, .*, .*,}} [[BB4to6:.*, .*, .*]] diff --git a/bolt/test/X86/jump-table-reference.test b/bolt/test/X86/jump-table-reference.test index 60ff2f801292..6a019b26cf63 100644 --- a/bolt/test/X86/jump-table-reference.test +++ b/bolt/test/X86/jump-table-reference.test @@ -1,6 +1,6 @@ # Verifies that BOLT detects fixed destination of indirect jump RUN: %clang %cflags -no-pie %S/Inputs/jump_table_reference.s -Wl,-q -o %t -RUN: llvm-bolt %t -relocs -o /dev/null 2>&1 | FileCheck %s +RUN: llvm-bolt %t --relocs -o /dev/null 2>&1 | FileCheck %s CHECK: BOLT-INFO: fixed indirect branch detected in main diff --git a/bolt/test/X86/layout-heuristic.test b/bolt/test/X86/layout-heuristic.test index fd2e635dd1ff..bec0ef01c85f 100644 --- a/bolt/test/X86/layout-heuristic.test +++ b/bolt/test/X86/layout-heuristic.test @@ -5,9 +5,10 @@ # Also checks that llvm-bolt disassembler and CFG builder is working properly. RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe -RUN: llvm-bolt %t.exe -o /dev/null -data %p/Inputs/blarge.fdata \ -RUN: -reorder-blocks=normal -print-cfg -print-reordered \ -RUN: -funcs=main,SolveCubic,usqrt -sequential-disassembly 2>&1 | FileCheck %s +RUN: llvm-bolt %t.exe -o /dev/null --data %p/Inputs/blarge.fdata \ +RUN: --reorder-blocks=normal --print-cfg --print-reordered \ +RUN: --funcs=main,SolveCubic,usqrt --sequential-disassembly \ +RUN: 2>&1 | FileCheck %s # Original order CHECK: Binary Function "main" diff --git a/bolt/test/X86/line-number.test b/bolt/test/X86/line-number.test index dc061ba0bc87..9c9d98df2f1d 100644 --- a/bolt/test/X86/line-number.test +++ b/bolt/test/X86/line-number.test @@ -1,9 +1,9 @@ # Verifies that the extraction of DWARF line number information is correct. RUN: %clangxx %cxxflags %S/Inputs/linenumber.cpp -g -o %t -RUN: llvm-bolt %t -o /dev/null -print-reordered -update-debug-sections \ -RUN: -print-debug-info -reorder-blocks=reverse -sequential-disassembly 2>&1 \ -RUN: | FileCheck %s +RUN: llvm-bolt %t -o /dev/null --print-reordered --update-debug-sections \ +RUN: --print-debug-info --reorder-blocks=reverse --sequential-disassembly \ +RUN: 2>&1 | FileCheck %s # Local variable in f() CHECK: movl $0xbeef, -0x4(%rbp) # debug line {{.*}}linenumber.cpp:9 diff --git a/bolt/test/X86/loop-inversion-pass.s b/bolt/test/X86/loop-inversion-pass.s index 8b37b8e2ae52..cb241110cf70 100644 --- a/bolt/test/X86/loop-inversion-pass.s +++ b/bolt/test/X86/loop-inversion-pass.s @@ -6,12 +6,15 @@ # RUN: link_fdata %s %t.o %t.fdata2 "FDATA2" # RUN: link_fdata %s %t.o %t.fdata3 "FDATA3" # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -data %t.fdata -reorder-blocks=ext-tsp -print-finalized \ -# RUN: -loop-inversion-opt -o %t.out | FileCheck %s -# RUN: llvm-bolt %t.exe -data %t.fdata2 -reorder-blocks=ext-tsp -print-finalized \ -# RUN: -loop-inversion-opt -o %t.out2 | FileCheck --check-prefix="CHECK2" %s -# RUN: llvm-bolt %t.exe -data %t.fdata3 -reorder-blocks=none -print-finalized \ -# RUN: -loop-inversion-opt -o %t.out3 | FileCheck --check-prefix="CHECK3" %s +# RUN: llvm-bolt %t.exe --data %t.fdata --reorder-blocks=ext-tsp \ +# RUN: --print-finalized --loop-inversion-opt -o %t.out \ +# RUN: | FileCheck %s +# RUN: llvm-bolt %t.exe --data %t.fdata2 --reorder-blocks=ext-tsp \ +# RUN: --print-finalized --loop-inversion-opt -o %t.out2 \ +# RUN: | FileCheck --check-prefix="CHECK2" %s +# RUN: llvm-bolt %t.exe --data %t.fdata3 --reorder-blocks=none \ +# RUN: --print-finalized --loop-inversion-opt -o %t.out3 \ +# RUN: | FileCheck --check-prefix="CHECK3" %s # The case where the loop is used: # FDATA: 1 main 2 1 main #.J1# 0 420 diff --git a/bolt/test/X86/loop-nest.test b/bolt/test/X86/loop-nest.test index b955294cc63e..24fde1004b00 100644 --- a/bolt/test/X86/loop-nest.test +++ b/bolt/test/X86/loop-nest.test @@ -6,8 +6,9 @@ RUN: link_fdata %p/Inputs/loop_nest.s %t.o %t.fdata --nmtool llvm-nm RUN: llvm-strip --strip-unneeded %t.o RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -RUN: llvm-bolt %t.exe -o %t -data=%t.fdata \ -RUN: -print-cfg -print-loops -sequential-disassembly -lite=0 2>&1 | FileCheck %s +RUN: llvm-bolt %t.exe -o %t --data=%t.fdata \ +RUN: --print-cfg --print-loops --sequential-disassembly --lite=0 \ +RUN: 2>&1 | FileCheck %s CHECK: Binary Function "main{{.*}}" after building cfg CHECK: Loop Info for Function "main{{.*}}" diff --git a/bolt/test/X86/lto-name-match.s b/bolt/test/X86/lto-name-match.s index 0bc5066488fa..a4dde00321d2 100644 --- a/bolt/test/X86/lto-name-match.s +++ b/bolt/test/X86/lto-name-match.s @@ -4,7 +4,7 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags %t.o -o %t.exe -# RUN: llvm-bolt %t.exe -data %t.fdata -o /dev/null | FileCheck %s +# RUN: llvm-bolt %t.exe --data %t.fdata -o /dev/null | FileCheck %s ## Check that profile is correctly matched by functions with variable suffixes. ## E.g., LTO-generated name foo.llvm.123 should match foo.llvm.*. diff --git a/bolt/test/X86/no-entry-reordering.test b/bolt/test/X86/no-entry-reordering.test index a52971f1c9ac..8f2e2c41a4c3 100644 --- a/bolt/test/X86/no-entry-reordering.test +++ b/bolt/test/X86/no-entry-reordering.test @@ -5,7 +5,7 @@ RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %S/Inputs/entry.s -o % RUN: link_fdata %S/Inputs/entry.s %t.o %t.fdata --nmtool llvm-nm RUN: llvm-strip --strip-unneeded %t.o RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib -RUN: llvm-bolt %t.exe -data %t.fdata -o /dev/null -reorder-blocks=normal \ -RUN: -funcs=_start -print-reordered -sequential-disassembly | FileCheck %s +RUN: llvm-bolt %t.exe --data %t.fdata -o /dev/null --reorder-blocks=normal \ +RUN: --funcs=_start --print-reordered --sequential-disassembly | FileCheck %s CHECK: BB Layout : .LBB00, {{.*}} diff --git a/bolt/test/X86/no-output.test b/bolt/test/X86/no-output.test index 1638a3db70de..523bdf25f521 100644 --- a/bolt/test/X86/no-output.test +++ b/bolt/test/X86/no-output.test @@ -7,8 +7,8 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -print-profile-stats -o /dev/null \ -# RUN: -data %t.fdata | FileCheck %s +# RUN: llvm-bolt %t.exe --print-profile-stats -o /dev/null \ +# RUN: --data %t.fdata | FileCheck %s .text .globl main diff --git a/bolt/test/X86/plt-sec-8-byte.test b/bolt/test/X86/plt-sec-8-byte.test index 409ca35d9bd7..d32faefe7cbb 100644 --- a/bolt/test/X86/plt-sec-8-byte.test +++ b/bolt/test/X86/plt-sec-8-byte.test @@ -1,6 +1,6 @@ ## Check correctness of processing .plt.sec with 8-byte entries. # RUN: yaml2obj %p/Inputs/plt-sec-8-byte.yaml &> %t.exe -# RUN: llvm-bolt %t.exe -print-cfg -print-only=main -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --print-cfg --print-only=main -o %t.out | FileCheck %s CHECK: callq printf@PLT CHECK: callq exit@PLT diff --git a/bolt/test/X86/plt-sec.test b/bolt/test/X86/plt-sec.test index f47ac5411bbc..6bff5f35138c 100644 --- a/bolt/test/X86/plt-sec.test +++ b/bolt/test/X86/plt-sec.test @@ -1,11 +1,11 @@ ## Check that llvm-bolt correctly identifies functions in .plt.sec # RUN: yaml2obj %p/Inputs/plt-sec.yaml &> %t.exe -# RUN: llvm-bolt %t.exe -print-cfg -print-only=foo -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --print-cfg --print-only=foo -o %t.out | FileCheck %s ## Check that llvm-bolt correctly identifies functions in .plt.got that has ## endbr instruction at the start of its entries. # RUN: yaml2obj %p/Inputs/plt-got-sec.yaml &> %t.exe -# RUN: llvm-bolt %t.exe -print-cfg -print-only=foo -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --print-cfg --print-only=foo -o %t.out | FileCheck %s ## The only call instruction in function foo() should be a call to PLT. CHECK: callq puts@PLT diff --git a/bolt/test/X86/reader.test b/bolt/test/X86/reader.test index 925f908a09ef..cc0bfe43511d 100644 --- a/bolt/test/X86/reader.test +++ b/bolt/test/X86/reader.test @@ -1,7 +1,7 @@ # This script checks that DataReader in llvm-bolt is reading data correctly RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe -RUN: llvm-bolt %t.exe -o /dev/null -data %p/Inputs/blarge.fdata --dump-data \ +RUN: llvm-bolt %t.exe -o /dev/null --data %p/Inputs/blarge.fdata --dump-data \ RUN: 2>&1 | sort | FileCheck %s -check-prefix=CHECK CHECK: main 1105 SolveCubic 0 0 151 diff --git a/bolt/test/X86/relaxed-tailcall.test b/bolt/test/X86/relaxed-tailcall.test index 00d4b178705a..d303c4255ae7 100644 --- a/bolt/test/X86/relaxed-tailcall.test +++ b/bolt/test/X86/relaxed-tailcall.test @@ -3,7 +3,7 @@ RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-unknown -o %t.o \ RUN: %S/Inputs/relaxed_tc.s RUN: ld.lld %t.o -o %t.exe -q -RUN: llvm-bolt %t.exe -relocs -o %t +RUN: llvm-bolt %t.exe --relocs -o %t RUN: llvm-objdump -d --disassemble-symbols=foo %t | FileCheck %s CHECK: eb 00 jmp {{.*}} diff --git a/bolt/test/X86/remove-unused.test b/bolt/test/X86/remove-unused.test index 2fe9687fcf63..45e9f428e91d 100644 --- a/bolt/test/X86/remove-unused.test +++ b/bolt/test/X86/remove-unused.test @@ -5,9 +5,9 @@ RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %S/Inputs/entry.s -o % RUN: link_fdata %S/Inputs/entry.s %t.o %t.fdata --nmtool llvm-nm RUN: llvm-strip --strip-unneeded %t.o RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib -RUN: llvm-bolt %t.exe -data %t.fdata -o %t -funcs=_start \ -RUN: -eliminate-unreachable -reorder-blocks=none \ -RUN: -print-finalized -sequential-disassembly 2>&1 | FileCheck %s +RUN: llvm-bolt %t.exe --data %t.fdata -o %t --funcs=_start \ +RUN: --eliminate-unreachable --reorder-blocks=none \ +RUN: --print-finalized --sequential-disassembly 2>&1 | FileCheck %s # Optimized CHECK: BB Layout : .LBB00, .Ltmp0, .Ltmp2, .Ltmp3, .Ltmp4, .Ltmp5, .Ltmp6, .Ltmp7, .Ltmp8, .Ltmp9, .Ltmp10, .Ltmp11 diff --git a/bolt/test/X86/rodata-simpl-loads.test b/bolt/test/X86/rodata-simpl-loads.test index 82d499c41f6d..8018ad75e5d6 100644 --- a/bolt/test/X86/rodata-simpl-loads.test +++ b/bolt/test/X86/rodata-simpl-loads.test @@ -1,7 +1,7 @@ # Check for the simplification of .rodata loads. RUN: %clang %cflags %p/Inputs/rodata_simpl_loads.s -o %t.exe -RUN: llvm-bolt %t.exe -o %t -simplify-rodata-loads +RUN: llvm-bolt %t.exe -o %t --simplify-rodata-loads RUN: FileCheck %s --check-prefix=ORIGINAL --input-file %p/Inputs/rodata_simpl_loads.s RUN: llvm-objdump -d %t --print-imm-hex --disassemble-symbols=main | FileCheck %s diff --git a/bolt/test/X86/sctc-bug.test b/bolt/test/X86/sctc-bug.test index 687b8cae8d81..a4568aca1414 100644 --- a/bolt/test/X86/sctc-bug.test +++ b/bolt/test/X86/sctc-bug.test @@ -1,7 +1,8 @@ # Check that we don't accidentally optimize out a tail call. RUN: %clang %cflags %S/Inputs/sctc_bug.s -o %t -RUN: llvm-bolt %t -o /dev/null -funcs=main -print-after-lowering 2>&1 | FileCheck %s +RUN: llvm-bolt %t -o /dev/null --funcs=main --print-after-lowering \ +RUN: 2>&1 | FileCheck %s CHECK: jp .L{{.*}} CHECK: je foo # TAILCALL diff --git a/bolt/test/X86/sctc-bug2.test b/bolt/test/X86/sctc-bug2.test index 9bf412d73130..cf23b38249ac 100644 --- a/bolt/test/X86/sctc-bug2.test +++ b/bolt/test/X86/sctc-bug2.test @@ -1,8 +1,8 @@ # Check that conditional tail call is not treated as a regular tail call by SCTC. RUN: %clang %cflags %S/Inputs/sctc_bug2.s -o %t -RUN: llvm-bolt %t -o /dev/null -funcs=main -print-after-lowering \ -RUN: -sequential-disassembly 2>&1 | FileCheck %s +RUN: llvm-bolt %t -o /dev/null --funcs=main --print-after-lowering \ +RUN: --sequential-disassembly 2>&1 | FileCheck %s CHECK: .LFT1 CHECK: ja .Ltmp0 diff --git a/bolt/test/X86/sctc-bug3.test b/bolt/test/X86/sctc-bug3.test index 48cc4e077f7b..fce69bf86a46 100644 --- a/bolt/test/X86/sctc-bug3.test +++ b/bolt/test/X86/sctc-bug3.test @@ -1,8 +1,8 @@ # Check that we don't accidentally optimize out a tail call. RUN: %clang %cflags %S/Inputs/sctc_bug3.s -o %t -RUN: llvm-bolt %t -o /dev/null -funcs=main -print-after-lowering \ -RUN: -sequential-disassembly 2>&1 | FileCheck %s +RUN: llvm-bolt %t -o /dev/null --funcs=main --print-after-lowering \ +RUN: --sequential-disassembly 2>&1 | FileCheck %s CHECK: .LBB00 (1 instructions, align : 1) CHECK: cmpq %rdi, 0x0 diff --git a/bolt/test/X86/shared-abbrev.s b/bolt/test/X86/shared-abbrev.s index 0975a005a400..755960421363 100644 --- a/bolt/test/X86/shared-abbrev.s +++ b/bolt/test/X86/shared-abbrev.s @@ -2,7 +2,7 @@ # RUN: mkdir %t # RUN: llvm-mc -filetype=obj -triple=x86_64 -dwarf-version=4 %s -o %t/shared-abbrev.o # RUN: %clang %cflags %t/shared-abbrev.o -o %t/shared-abbrev.exe -# RUN: llvm-bolt %t/shared-abbrev.exe -o %t/shared-abbrev.exe.bolt -update-debug-sections +# RUN: llvm-bolt %t/shared-abbrev.exe -o %t/shared-abbrev.exe.bolt --update-debug-sections # RUN: llvm-dwarfdump --debug-info %t/shared-abbrev.exe.bolt | FileCheck %s # CHECK: 0x00000000: diff --git a/bolt/test/X86/shrinkwrapping-and-rsp.s b/bolt/test/X86/shrinkwrapping-and-rsp.s index 2228c6037e9c..2e5918e857e6 100644 --- a/bolt/test/X86/shrinkwrapping-and-rsp.s +++ b/bolt/test/X86/shrinkwrapping-and-rsp.s @@ -8,9 +8,9 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib -# RUN: llvm-bolt %t.exe -o %t.out -data %t.fdata \ -# RUN: -frame-opt=all -simplify-conditional-tail-calls=false \ -# RUN: -eliminate-unreachable=false | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata \ +# RUN: --frame-opt=all --simplify-conditional-tail-calls=false \ +# RUN: --eliminate-unreachable=false | FileCheck %s # Here we have a function that aligns the stack at prologue. Stack pointer # analysis can't try to infer offset positions after AND because that depends diff --git a/bolt/test/X86/shrinkwrapping-critedge.s b/bolt/test/X86/shrinkwrapping-critedge.s index fb00ffa658f3..ed9a206dec41 100644 --- a/bolt/test/X86/shrinkwrapping-critedge.s +++ b/bolt/test/X86/shrinkwrapping-critedge.s @@ -8,9 +8,9 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -nostdlib -# RUN: llvm-bolt %t.exe -relocs -o %t.out -data %t.fdata \ -# RUN: -frame-opt=all -simplify-conditional-tail-calls=false \ -# RUN: -eliminate-unreachable=false +# RUN: llvm-bolt %t.exe --relocs -o %t.out --data %t.fdata \ +# RUN: --frame-opt=all --simplify-conditional-tail-calls=false \ +# RUN: --eliminate-unreachable=false .globl _start _start: diff --git a/bolt/test/X86/shrinkwrapping-insertcfi.s b/bolt/test/X86/shrinkwrapping-insertcfi.s index 2acc5a23a5ef..57b43cf4b662 100644 --- a/bolt/test/X86/shrinkwrapping-insertcfi.s +++ b/bolt/test/X86/shrinkwrapping-insertcfi.s @@ -7,8 +7,8 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib -# RUN: llvm-bolt %t.exe -o %t.out -data %t.fdata -frame-opt=all -lite=0 \ -# RUN: -print-fop 2>&1 | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --frame-opt=all --lite=0 \ +# RUN: --print-fop 2>&1 | FileCheck %s # Check shrink wrapping results: # CHECK: BOLT-INFO: Shrink wrapping moved 0 spills inserting load/stores and 1 spills inserting push/pops diff --git a/bolt/test/X86/shrinkwrapping-pop-order.s b/bolt/test/X86/shrinkwrapping-pop-order.s index f2453ebde2e2..5045ba20bac7 100644 --- a/bolt/test/X86/shrinkwrapping-pop-order.s +++ b/bolt/test/X86/shrinkwrapping-pop-order.s @@ -8,8 +8,8 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib -# RUN: llvm-bolt %t.exe -o %t.out -data %t.fdata -frame-opt=all -lite=0 \ -# RUN: -print-fop 2>&1 | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --frame-opt=all --lite=0 \ +# RUN: --print-fop 2>&1 | FileCheck %s .globl _start _start: diff --git a/bolt/test/X86/shrinkwrapping-popf.s b/bolt/test/X86/shrinkwrapping-popf.s index bf0c8a189f5f..975702df0179 100644 --- a/bolt/test/X86/shrinkwrapping-popf.s +++ b/bolt/test/X86/shrinkwrapping-popf.s @@ -6,7 +6,7 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib -# RUN: llvm-bolt %t.exe -o %t.out -data %t.fdata -frame-opt=all -lite=0 +# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --frame-opt=all --lite=0 .globl _start diff --git a/bolt/test/X86/shrinkwrapping.test b/bolt/test/X86/shrinkwrapping.test index 33802d53ac4b..594a87ed7844 100644 --- a/bolt/test/X86/shrinkwrapping.test +++ b/bolt/test/X86/shrinkwrapping.test @@ -3,8 +3,8 @@ # frame pointers. RUN: %clangxx %cxxflags -no-pie %S/Inputs/exc4sw.S -o %t.exe -Wl,-q -RUN: llvm-bolt %t.exe -o %t -relocs -frame-opt=all \ -RUN: -data=%p/Inputs/exc4sw.fdata -reorder-blocks=cache 2>&1 | \ +RUN: llvm-bolt %t.exe -o %t --relocs --frame-opt=all \ +RUN: --data=%p/Inputs/exc4sw.fdata --reorder-blocks=cache 2>&1 | \ RUN: FileCheck %s --check-prefix=CHECK-BOLT RUN: llvm-objdump --dwarf=frames %t.exe | grep -A20 -e \ diff --git a/bolt/test/X86/split-func-jump-table-fragment-noparent.s b/bolt/test/X86/split-func-jump-table-fragment-noparent.s index 148639e99c81..a3ac643ee137 100644 --- a/bolt/test/X86/split-func-jump-table-fragment-noparent.s +++ b/bolt/test/X86/split-func-jump-table-fragment-noparent.s @@ -7,7 +7,7 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.out -lite=0 -v=1 2>&1 | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.out --lite=0 -v=1 2>&1 | FileCheck %s # CHECK-NOT: unclaimed PC-relative relocations left in data # CHECK: BOLT-INFO: marking main.cold.1 as a fragment of main diff --git a/bolt/test/X86/split-func-jump-table-fragment-reverse.s b/bolt/test/X86/split-func-jump-table-fragment-reverse.s index 4b9b51132170..639c800a795b 100644 --- a/bolt/test/X86/split-func-jump-table-fragment-reverse.s +++ b/bolt/test/X86/split-func-jump-table-fragment-reverse.s @@ -7,7 +7,7 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.out -lite=0 -v=1 2>&1 | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.out --lite=0 -v=1 2>&1 | FileCheck %s # CHECK-NOT: unclaimed PC-relative relocations left in data # CHECK: BOLT-INFO: marking main.cold as a fragment of main diff --git a/bolt/test/X86/split-func-jump-table-fragment.s b/bolt/test/X86/split-func-jump-table-fragment.s index 891466dcdcac..6b6dc227ace1 100644 --- a/bolt/test/X86/split-func-jump-table-fragment.s +++ b/bolt/test/X86/split-func-jump-table-fragment.s @@ -6,7 +6,7 @@ # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.out -lite=0 -v=1 2>&1 | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.out --lite=0 -v=1 2>&1 | FileCheck %s # CHECK-NOT: unclaimed PC-relative relocations left in data # CHECK: BOLT-INFO: marking main.cold.1 as a fragment of main diff --git a/bolt/test/X86/srol-bug.test b/bolt/test/X86/srol-bug.test index a6abbea4a2f2..10b7a6132261 100644 --- a/bolt/test/X86/srol-bug.test +++ b/bolt/test/X86/srol-bug.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %p/Inputs/srol-bug-input.yaml &> %t.exe -# RUN: llvm-bolt %t.exe -simplify-rodata-loads -print-finalized -relocs=0 \ -# RUN: -print-disasm -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --simplify-rodata-loads --print-finalized --relocs=0 \ +# RUN: --print-disasm -o %t.out | FileCheck %s CHECK: Binary Function "myfunc" after disassembly { CHECK: 00000000: addl mydata(%rip), %edx diff --git a/bolt/test/X86/symtab-secondary-entries.test b/bolt/test/X86/symtab-secondary-entries.test index 4e4ea85eb156..6e05129340a0 100644 --- a/bolt/test/X86/symtab-secondary-entries.test +++ b/bolt/test/X86/symtab-secondary-entries.test @@ -3,8 +3,8 @@ RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \ RUN: %p/Inputs/user-order.S -o %t.o RUN: ld.lld %t.o --emit-relocs --nostdlib -o %t.exe -RUN: llvm-bolt %t.exe -o %t -reorder-functions=user \ -RUN: -function-order=%p/Inputs/order.txt +RUN: llvm-bolt %t.exe -o %t --reorder-functions=user \ +RUN: --function-order=%p/Inputs/order.txt RUN: llvm-readelf -Ws %t | cut -d':' -f2- | sort -u | FileCheck %s diff --git a/bolt/test/X86/tail-duplication-cache.s b/bolt/test/X86/tail-duplication-cache.s index 640d5956c595..d7955eff9ead 100644 --- a/bolt/test/X86/tail-duplication-cache.s +++ b/bolt/test/X86/tail-duplication-cache.s @@ -5,10 +5,11 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: link_fdata %s %t.o %t.fdata2 "FDATA2" # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -data %t.fdata -reorder-blocks=none -print-finalized \ -# RUN: -tail-duplication=cache -o %t.out | FileCheck %s -# RUN: llvm-bolt %t.exe -data %t.fdata2 -reorder-blocks=none -print-finalized \ -# RUN: -tail-duplication=cache -o %t.out2 | FileCheck --check-prefix="CHECK2" %s +# RUN: llvm-bolt %t.exe --data %t.fdata --reorder-blocks=none \ +# RUN: --print-finalized --tail-duplication=cache -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --data %t.fdata2 --reorder-blocks=none \ +# RUN: --print-finalized --tail-duplication=cache -o %t.out2 \ +# RUN: | FileCheck --check-prefix="CHECK2" %s # A test where the tail is duplicated to eliminate an uncoditional jump # FDATA: 1 main #.BB0_br# 1 main #.BB4# 0 100 diff --git a/bolt/test/X86/tail-duplication-cacheline.s b/bolt/test/X86/tail-duplication-cacheline.s index 62f1bbe4a024..acc49dc34834 100644 --- a/bolt/test/X86/tail-duplication-cacheline.s +++ b/bolt/test/X86/tail-duplication-cacheline.s @@ -8,8 +8,8 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -nostdlib -# RUN: llvm-bolt %t.exe -o %t.out -data %t.fdata -relocs \ -# RUN: -tail-duplication=aggressive +# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --relocs \ +# RUN: --tail-duplication=aggressive .globl _start _start: jmp d diff --git a/bolt/test/X86/tail-duplication-complex.s b/bolt/test/X86/tail-duplication-complex.s index 6b1c88f73ca8..ced59aea7a4c 100644 --- a/bolt/test/X86/tail-duplication-complex.s +++ b/bolt/test/X86/tail-duplication-complex.s @@ -5,8 +5,9 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -data %t.fdata -print-finalized \ -# RUN: -tail-duplication=moderate -tail-duplication-minimum-offset 1 -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --data %t.fdata --print-finalized \ +# RUN: --tail-duplication=moderate --tail-duplication-minimum-offset=1 \ +# RUN: -o %t.out | FileCheck %s # FDATA: 1 main f 1 main 19 0 10 # FDATA: 1 main f 1 main 11 0 13 diff --git a/bolt/test/X86/tail-duplication-jt.s b/bolt/test/X86/tail-duplication-jt.s index 4b003f30ee8d..03211b399ba6 100644 --- a/bolt/test/X86/tail-duplication-jt.s +++ b/bolt/test/X86/tail-duplication-jt.s @@ -8,9 +8,9 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clangxx %cflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.out -data %t.fdata -relocs \ -# RUN: -tail-duplication=aggressive \ -# RUN: -print-cfg | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --relocs \ +# RUN: --tail-duplication=aggressive \ +# RUN: --print-cfg | FileCheck %s # CHECK: Jump table {{.*}} for function a at {{.*}} with a total count of 3 .globl main main: diff --git a/bolt/test/X86/tail-duplication-pass.s b/bolt/test/X86/tail-duplication-pass.s index e601a717acbd..677f4986eb89 100644 --- a/bolt/test/X86/tail-duplication-pass.s +++ b/bolt/test/X86/tail-duplication-pass.s @@ -4,8 +4,9 @@ # RUN: %s -o %t.o # RUN: link_fdata %s %t.o %t.fdata # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -data %t.fdata -reorder-blocks=ext-tsp -print-finalized \ -# RUN: -tail-duplication=moderate -tail-duplication-minimum-offset=1 -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --data %t.fdata --reorder-blocks=ext-tsp \ +# RUN: --print-finalized --tail-duplication=moderate \ +# RUN: --tail-duplication-minimum-offset=1 -o %t.out | FileCheck %s # FDATA: 1 main 2 1 main #.BB2# 0 10 # FDATA: 1 main 4 1 main #.BB2# 0 20 diff --git a/bolt/test/X86/tail-duplication-prop-bug.s b/bolt/test/X86/tail-duplication-prop-bug.s index 9d417a513d1e..5e9efc87fa2f 100644 --- a/bolt/test/X86/tail-duplication-prop-bug.s +++ b/bolt/test/X86/tail-duplication-prop-bug.s @@ -5,9 +5,9 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: ld.lld %t.o -o %t.exe -q -nostdlib -# RUN: llvm-bolt %t.exe -o %t.out -data %t.fdata -relocs \ -# RUN: -tail-duplication=aggressive \ -# RUN: -tail-duplication-const-copy-propagation=1 +# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --relocs \ +# RUN: --tail-duplication=aggressive \ +# RUN: --tail-duplication-const-copy-propagation=1 .text .type a, %function diff --git a/bolt/test/X86/tailcall-traps.test b/bolt/test/X86/tailcall-traps.test index 5f075cf20477..7ce6d61a738b 100644 --- a/bolt/test/X86/tailcall-traps.test +++ b/bolt/test/X86/tailcall-traps.test @@ -1,8 +1,8 @@ # Tests the peephole that adds trap instructions following indirect tail calls. RUN: %clang %cflags %p/Inputs/tailcall_traps.s -o %t.exe -RUN: llvm-bolt %t.exe -o %t -peepholes=tailcall-traps \ -RUN: -print-peepholes -funcs=foo,bar 2>&1 | FileCheck %s +RUN: llvm-bolt %t.exe -o %t --peepholes=tailcall-traps \ +RUN: --print-peepholes --funcs=foo,bar 2>&1 | FileCheck %s CHECK: Binary Function "foo" CHECK: jmpl *%rax # TAILCALL diff --git a/bolt/test/X86/tailcall.test b/bolt/test/X86/tailcall.test index 4f2fbb089705..09a31a601607 100644 --- a/bolt/test/X86/tailcall.test +++ b/bolt/test/X86/tailcall.test @@ -2,7 +2,7 @@ # in control flow graph. RUN: %clang %cflags %S/Inputs/tailcall.s -o %t.exe -RUN: llvm-bolt %t.exe -o /dev/null -print-cfg 2>&1 | FileCheck %s +RUN: llvm-bolt %t.exe -o /dev/null --print-cfg 2>&1 | FileCheck %s CHECK: Binary Function "foo" CHECK: jmp bar # TAILCALL diff --git a/bolt/test/X86/vararg.test b/bolt/test/X86/vararg.test index 0530d670b425..bfbc23efb9dc 100644 --- a/bolt/test/X86/vararg.test +++ b/bolt/test/X86/vararg.test @@ -5,7 +5,7 @@ REQUIRES: x86_64-linux RUN: %clangxx %cxxflags -no-pie %p/../Inputs/vararg.s -o %t -Wl,-q -RUN: llvm-bolt %t -o /dev/null -print-cfg -print-only=.*printf.* |& FileCheck %s +RUN: llvm-bolt %t -o /dev/null --print-cfg --print-only=.*printf.* |& FileCheck %s CHECK: IsSimple : 0 CHECK: Entry Point diff --git a/bolt/test/X86/zero-sized-object.s b/bolt/test/X86/zero-sized-object.s index f94274714471..1f3522bce213 100755 --- a/bolt/test/X86/zero-sized-object.s +++ b/bolt/test/X86/zero-sized-object.s @@ -7,8 +7,8 @@ # RUN: %s -o %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -print-cfg \ -# RUN: -print-only=main -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --print-cfg \ +# RUN: --print-only=main -o %t.out | FileCheck %s .file "rust_bug.c" .section .rodata diff --git a/bolt/test/bolt-icf.test b/bolt/test/bolt-icf.test index ebbe28b6d680..f7b056e2ddb0 100644 --- a/bolt/test/bolt-icf.test +++ b/bolt/test/bolt-icf.test @@ -3,7 +3,7 @@ REQUIRES: system-linux RUN: %clangxx %p/Inputs/bolt_icf.cpp -g -Wl,-q -o %t.exe -RUN: llvm-bolt %t.exe -relocs -o %t -icf 2>&1 | FileCheck %s +RUN: llvm-bolt %t.exe --relocs -o %t --icf 2>&1 | FileCheck %s RUN: llvm-nm -n %t | FileCheck %s -check-prefix=CHECK-SYM CHECK: BOLT-INFO: ICF folded [[#]] out of [[#]] functions in [[#]] passes. diff --git a/bolt/test/cache+-deprecated.test b/bolt/test/cache+-deprecated.test index 2676711a02a5..c320ea8816e7 100644 --- a/bolt/test/cache+-deprecated.test +++ b/bolt/test/cache+-deprecated.test @@ -3,6 +3,6 @@ REQUIRES: system-linux RUN: %clangxx %p/Inputs/bolt_icf.cpp -g -Wl,-q -o %t.exe -RUN: llvm-bolt %t.exe -reorder-blocks=cache+ -relocs -o %t 2>&1 | FileCheck %s +RUN: llvm-bolt %t.exe --reorder-blocks=cache+ --relocs -o %t 2>&1 | FileCheck %s CHECK: '-reorder-blocks=cache+' is deprecated, please use '-reorder-blocks=ext-tsp' instead diff --git a/bolt/test/invalid-profile.test b/bolt/test/invalid-profile.test index d26a3f5de4c5..dfb4fb0e427f 100644 --- a/bolt/test/invalid-profile.test +++ b/bolt/test/invalid-profile.test @@ -1,6 +1,6 @@ # Check that llvm-bolt detects bad profile data and aborts RUN: %clang %S/Inputs/icf-jump-tables.c -o %t -RUN: not llvm-bolt %t -o %t.bolt -data %t 2>&1 | FileCheck %s +RUN: not llvm-bolt %t -o %t.bolt --data %t 2>&1 | FileCheck %s CHECK: no valid profile data found diff --git a/bolt/test/keep-aranges.test b/bolt/test/keep-aranges.test index ada08b54f010..5a9d932bc1af 100644 --- a/bolt/test/keep-aranges.test +++ b/bolt/test/keep-aranges.test @@ -5,7 +5,7 @@ REQUIRES: system-linux RUN: %clang %cflags %S/Inputs/icf_baz.c %S/Inputs/icf_main.c -Wl,--icf=all,--gdb-index \ RUN: -g -o %t.exe -fuse-ld=lld -RUN: llvm-bolt %t.exe -o %t -update-debug-sections -keep-aranges +RUN: llvm-bolt %t.exe -o %t --update-debug-sections --keep-aranges RUN: llvm-dwarfdump -debug-aranges %t | FileCheck %s CHECK: Address Range Header: length = {{.*}}, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 diff --git a/bolt/test/no-relocs.test b/bolt/test/no-relocs.test index ff2af84e470c..97168cb17b4e 100644 --- a/bolt/test/no-relocs.test +++ b/bolt/test/no-relocs.test @@ -1,6 +1,6 @@ # Verifies that input without relocations is rejected in relocs mode. RUN: %clang %cflags %S/Inputs/icf-jump-tables.c -o %t -RUN: not llvm-bolt %t -o /dev/null -relocs 2>&1 | FileCheck %s +RUN: not llvm-bolt %t -o /dev/null --relocs 2>&1 | FileCheck %s CHECK: BOLT-ERROR: relocations against code are missing from the input file. diff --git a/bolt/test/non-empty-debug-line.test b/bolt/test/non-empty-debug-line.test index 50c215ab91d1..e3de8335238d 100644 --- a/bolt/test/non-empty-debug-line.test +++ b/bolt/test/non-empty-debug-line.test @@ -4,7 +4,7 @@ REQUIRES: system-linux RUN: %clang %cflags %S/Inputs/hello.c -g -o %t -RUN: llvm-bolt %t -o %t1 -update-debug-sections -funcs=_start +RUN: llvm-bolt %t -o %t1 --update-debug-sections --funcs=_start RUN: llvm-readobj -S %t > %t2 RUN: llvm-readobj -S %t1 >> %t2 RUN: FileCheck %s --input-file %t2 diff --git a/bolt/test/runtime/AArch64/adrrelaxationpass.s b/bolt/test/runtime/AArch64/adrrelaxationpass.s index 1abb3ee19b73..b8790d50f7b5 100644 --- a/bolt/test/runtime/AArch64/adrrelaxationpass.s +++ b/bolt/test/runtime/AArch64/adrrelaxationpass.s @@ -6,7 +6,7 @@ # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \ # RUN: %s -o %t.o # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -adr-relaxation=true +# RUN: llvm-bolt %t.exe -o %t.bolt --adr-relaxation=true # RUN: llvm-objdump -d --disassemble-symbols=main %t.bolt | FileCheck %s # RUN: %t.bolt diff --git a/bolt/test/runtime/AArch64/constant-island-relocations.s b/bolt/test/runtime/AArch64/constant-island-relocations.s index 82bd4f206d2c..a2c4123126b5 100644 --- a/bolt/test/runtime/AArch64/constant-island-relocations.s +++ b/bolt/test/runtime/AArch64/constant-island-relocations.s @@ -6,7 +6,7 @@ # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \ # RUN: %s -o %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -use-old-text=0 -lite=0 -trap-old-code +# RUN: llvm-bolt %t.exe -o %t.bolt --use-old-text=0 --lite=0 --trap-old-code # RUN: %t.bolt .text diff --git a/bolt/test/runtime/AArch64/controlflow.s b/bolt/test/runtime/AArch64/controlflow.s index fd66e443c605..fe9aab88f0c7 100644 --- a/bolt/test/runtime/AArch64/controlflow.s +++ b/bolt/test/runtime/AArch64/controlflow.s @@ -5,7 +5,7 @@ # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \ # RUN: %s -o %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -use-old-text=0 -lite=0 -trap-old-code +# RUN: llvm-bolt %t.exe -o %t.bolt --use-old-text=0 --lite=0 --trap-old-code # RUN: %t.bolt .macro panic diff --git a/bolt/test/runtime/AArch64/issue177.s b/bolt/test/runtime/AArch64/issue177.s index 1fddaf7806b9..3ed8d7cbf50c 100644 --- a/bolt/test/runtime/AArch64/issue177.s +++ b/bolt/test/runtime/AArch64/issue177.s @@ -4,7 +4,7 @@ # REQUIRES: system-linux # RUN: %clang %cflags -no-pie %s -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -o %t.bolt -use-old-text=0 -lite=0 -trap-old-code +# RUN: llvm-bolt %t.exe -o %t.bolt --use-old-text=0 --lite=0 --trap-old-code # RUN: %t.bolt .text diff --git a/bolt/test/runtime/X86/basic-instrumentation.test b/bolt/test/runtime/X86/basic-instrumentation.test index cb99868b1e43..c64dc279df7e 100644 --- a/bolt/test/runtime/X86/basic-instrumentation.test +++ b/bolt/test/runtime/X86/basic-instrumentation.test @@ -3,9 +3,9 @@ REQUIRES: system-linux RUN: %clang %p/Inputs/basic-instrumentation.s -Wl,-q -o %t.exe -RUN: llvm-bolt %t.exe -o %t -instrument \ -RUN: -instrumentation-file=%t \ -RUN: -instrumentation-file-append-pid +RUN: llvm-bolt %t.exe -o %t --instrument \ +RUN: --instrumentation-file=%t \ +RUN: --instrumentation-file-append-pid # Execute program to collect profile RUN: rm %t.*.fdata || echo Nothing to remove @@ -16,7 +16,7 @@ RUN: mv %t.*.fdata %t.fdata RUN: cat %t.fdata | FileCheck -check-prefix=CHECK %s # Check BOLT works with this profile -RUN: llvm-bolt %t.exe -data %t.fdata -o %t.2 -reorder-blocks=cache +RUN: llvm-bolt %t.exe --data %t.fdata -o %t.2 --reorder-blocks=cache # The instrumented profile should at least say main was called once CHECK: main 0 0 1{{$}} diff --git a/bolt/test/runtime/X86/exceptions-instrumentation.test b/bolt/test/runtime/X86/exceptions-instrumentation.test index b5a08a51bb26..db26bdefc54c 100644 --- a/bolt/test/runtime/X86/exceptions-instrumentation.test +++ b/bolt/test/runtime/X86/exceptions-instrumentation.test @@ -3,13 +3,14 @@ REQUIRES: system-linux RUN: %clangxx %cxxflags -no-pie %p/Inputs/exceptions_split.cpp -Wl,-q -g -o %t_exc_split -RUN: llvm-bolt %t_exc_split -o %t.exc -instrument -instrumentation-file=%t.fdata +RUN: llvm-bolt %t_exc_split -o %t.exc --instrument --instrumentation-file=%t.fdata RUN: %t.exc arg1 arg2 arg3 -RUN: llvm-bolt %t_exc_split -o %t.exc.bolted -data %t.fdata \ -RUN: -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions=3 \ -RUN: -split-eh=1 | FileCheck --check-prefix=EXCEPTIONS %s +RUN: llvm-bolt %t_exc_split -o %t.exc.bolted --data %t.fdata \ +RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \ +RUN: --split-functions=3 --split-eh=1 \ +RUN: | FileCheck --check-prefix=EXCEPTIONS %s EXCEPTIONS-NOT: invalid (possibly stale) profile # Check that cold symbols are emitted with local binding. diff --git a/bolt/test/runtime/X86/exceptions-pic.test b/bolt/test/runtime/X86/exceptions-pic.test index 9a1b050cbea0..e65f86050fee 100644 --- a/bolt/test/runtime/X86/exceptions-pic.test +++ b/bolt/test/runtime/X86/exceptions-pic.test @@ -4,7 +4,7 @@ REQUIRES: x86_64-linux RUN: %clangxx -fpic -Wl,-q %S/Inputs/exception4.cpp -o %t.pic RUN: llvm-bolt %t.pic -o %t && %t 2>&1 | FileCheck %s -RUN: llvm-bolt -relocs -use-old-text %t.pic -o %t && %t 2>&1 | FileCheck %s +RUN: llvm-bolt --relocs --use-old-text %t.pic -o %t && %t 2>&1 | FileCheck %s CHECK: catch 2 CHECK-NEXT: catch 1 diff --git a/bolt/test/runtime/X86/exceptions-run.test b/bolt/test/runtime/X86/exceptions-run.test index 88e0ecccb6e1..45702ef358a0 100644 --- a/bolt/test/runtime/X86/exceptions-run.test +++ b/bolt/test/runtime/X86/exceptions-run.test @@ -4,8 +4,8 @@ REQUIRES: x86_64-linux RUN: %clangxx -g %S/Inputs/exception3.cpp -o %t.exe -RUN: llvm-bolt -align-blocks=0 %t.exe -o %t && %t 2>&1 | FileCheck %s -RUN: llvm-bolt -reorder-blocks=reverse -align-blocks=0 %t.exe -o %t && %t 2>&1 \ +RUN: llvm-bolt --align-blocks=0 %t.exe -o %t && %t 2>&1 | FileCheck %s +RUN: llvm-bolt --reorder-blocks=reverse --align-blocks=0 %t.exe -o %t && %t 2>&1 \ RUN: | FileCheck %s CHECK: catch 2 diff --git a/bolt/test/runtime/X86/fdata-escape-chars.ll b/bolt/test/runtime/X86/fdata-escape-chars.ll index 757a8b609280..3f0bb12c33ba 100644 --- a/bolt/test/runtime/X86/fdata-escape-chars.ll +++ b/bolt/test/runtime/X86/fdata-escape-chars.ll @@ -56,18 +56,18 @@ define internal void @static_symb_backslash_b() #0 { ; RUN: %clang %cflags -O0 %t.s -o %t.exe -Wl,-q ; RUN: llvm-objcopy --redefine-syms=%p/Inputs/fdata-escape-chars-syms.txt %t.exe ; -; RUN: llvm-bolt %t.exe -o %t.exe.instrumented -instrument \ -; RUN: -instrumentation-file=%t.fdata +; RUN: llvm-bolt %t.exe -o %t.exe.instrumented --instrument \ +; RUN: --instrumentation-file=%t.fdata ; RUN: %t.exe.instrumented ; RUN: cat %t.fdata | \ ; RUN: FileCheck --check-prefix="FDATA_CHECK" %s -; RUN: llvm-bolt %t.exe -o %t.fdata.exe -data %t.fdata -print-finalized | \ +; RUN: llvm-bolt %t.exe -o %t.fdata.exe --data %t.fdata --print-finalized | \ ; RUN: FileCheck --check-prefix="INSTR_CHECK" %s ; ; RUN: link_fdata %p/Inputs/fdata-escape-chars.txt %t.exe %t.pre "PREAGR" ; RUN: perf2bolt %t.exe -o %t.pre.fdata -pa -p %t.pre ; RUN: cat %t.pre.fdata | FileCheck --check-prefix="PREAGR_FDATA_CHECK" %s -; RUN: llvm-bolt %t.exe -o %t.pre.fdata.exe -data %t.pre.fdata -print-finalized | \ +; RUN: llvm-bolt %t.exe -o %t.pre.fdata.exe --data %t.pre.fdata --print-finalized | \ ; RUN: FileCheck --check-prefix="PREAGR_CHECK" %s ; FDATA_CHECK: 1 symb\ backslash\\ {{([[:xdigit:]]+)}} 1 symb\ whitespace 0 0 2 diff --git a/bolt/test/runtime/X86/fix-branches-jrcxz.s b/bolt/test/runtime/X86/fix-branches-jrcxz.s index aa627f028ebc..7ad34c7471b3 100755 --- a/bolt/test/runtime/X86/fix-branches-jrcxz.s +++ b/bolt/test/runtime/X86/fix-branches-jrcxz.s @@ -7,8 +7,8 @@ # RUN: link_fdata %s %t.o %t.fdata # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -relocs=1 -reorder-blocks=ext-tsp -print-finalized \ -# RUN: -o %t.out -data %t.fdata | FileCheck %s +# RUN: llvm-bolt %t.exe --relocs=1 --reorder-blocks=ext-tsp --print-finalized \ +# RUN: -o %t.out --data %t.fdata | FileCheck %s # RUN: %t.out 1 2 3 # CHECK: BOLT-INFO diff --git a/bolt/test/runtime/X86/hot-end-symbol.s b/bolt/test/runtime/X86/hot-end-symbol.s index f8ac01b3f7b8..e6d83d77167a 100755 --- a/bolt/test/runtime/X86/hot-end-symbol.s +++ b/bolt/test/runtime/X86/hot-end-symbol.s @@ -11,8 +11,8 @@ # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -relocs=1 -hot-text -reorder-functions=hfsort \ -# RUN: -data %t.fdata -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --relocs=1 --hot-text --reorder-functions=hfsort \ +# RUN: --data %t.fdata -o %t.out | FileCheck %s # RUN: %t.out 1 diff --git a/bolt/test/runtime/X86/indirect-goto-pie.test b/bolt/test/runtime/X86/indirect-goto-pie.test index 0280f88478db..76089fda3abf 100644 --- a/bolt/test/runtime/X86/indirect-goto-pie.test +++ b/bolt/test/runtime/X86/indirect-goto-pie.test @@ -2,7 +2,7 @@ REQUIRES: x86_64-linux RUN: %clang %S/Inputs/indirect_goto.c -o %t -fpic -pie -Wl,-q -RUN: llvm-bolt %t -o %t.bolt -relocs=1 -print-cfg -print-only=main \ +RUN: llvm-bolt %t -o %t.bolt --relocs=1 --print-cfg --print-only=main \ RUN: |& FileCheck %s # The test fails as we don't update corresponding dynamic relocations. RUN: not %t.bolt diff --git a/bolt/test/runtime/X86/instrumentation-dup-jts.s b/bolt/test/runtime/X86/instrumentation-dup-jts.s index 7d48104eb3c9..26f3ab3c2a43 100755 --- a/bolt/test/runtime/X86/instrumentation-dup-jts.s +++ b/bolt/test/runtime/X86/instrumentation-dup-jts.s @@ -48,16 +48,16 @@ # RUN: %s -o %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -instrument -instrumentation-file=%t.fdata \ +# RUN: llvm-bolt %t.exe --instrument --instrumentation-file=%t.fdata \ # RUN: -o %t.instrumented # Instrumented program needs to finish returning zero # RUN: %t.instrumented 120 # Test that the instrumented data makes sense -# RUN: llvm-bolt %t.exe -o %t.bolted -data %t.fdata \ -# RUN: -reorder-blocks=ext-tsp -reorder-functions=hfsort+ \ -# RUN: -print-only=interp -print-finalized | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.bolted --data %t.fdata \ +# RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \ +# RUN: --print-only=interp --print-finalized | FileCheck %s # RUN: %t.bolted 120 diff --git a/bolt/test/runtime/X86/instrumentation-ind-calls.s b/bolt/test/runtime/X86/instrumentation-ind-calls.s index 2e304aa321ec..60f0d82236bd 100755 --- a/bolt/test/runtime/X86/instrumentation-ind-calls.s +++ b/bolt/test/runtime/X86/instrumentation-ind-calls.s @@ -12,16 +12,16 @@ # RUN: %s -o %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -instrument -instrumentation-file=%t.fdata \ +# RUN: llvm-bolt %t.exe --instrument --instrumentation-file=%t.fdata \ # RUN: -o %t.instrumented # Instrumented program needs to finish returning zero # RUN: %t.instrumented arg1 arg2 # Test that the instrumented data makes sense -# RUN: llvm-bolt %t.exe -o %t.bolted -data %t.fdata \ -# RUN: -reorder-blocks=ext-tsp -reorder-functions=hfsort+ \ -# RUN: -print-only=main -print-finalized | FileCheck %s +# RUN: llvm-bolt %t.exe -o %t.bolted --data %t.fdata \ +# RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \ +# RUN: --print-only=main --print-finalized | FileCheck %s # RUN: %t.bolted arg1 arg2 diff --git a/bolt/test/runtime/X86/instrumentation-indirect.c b/bolt/test/runtime/X86/instrumentation-indirect.c index 86911c04bea6..54f1b676ef52 100644 --- a/bolt/test/runtime/X86/instrumentation-indirect.c +++ b/bolt/test/runtime/X86/instrumentation-indirect.c @@ -40,24 +40,24 @@ REQUIRES: system-linux && lit-max-individual-test-time RUN: %clang %cflags %s -o %t.exe -Wl,-q -pie -fpie -RUN: llvm-bolt %t.exe -instrument -instrumentation-file=%t.fdata \ -RUN: -instrumentation-wait-forks=1 -conservative-instrumentation \ +RUN: llvm-bolt %t.exe --instrument --instrumentation-file=%t.fdata \ +RUN: --instrumentation-wait-forks=1 --conservative-instrumentation \ RUN: -o %t.instrumented_conservative # Instrumented program needs to finish returning zero RUN: %t.instrumented_conservative | FileCheck %s -check-prefix=CHECK-OUTPUT -RUN: llvm-bolt %t.exe -instrument -instrumentation-file=%t.fdata \ -RUN: -instrumentation-wait-forks=1 \ +RUN: llvm-bolt %t.exe --instrument --instrumentation-file=%t.fdata \ +RUN: --instrumentation-wait-forks=1 \ RUN: -o %t.instrumented # Instrumented program needs to finish returning zero RUN: %t.instrumented | FileCheck %s -check-prefix=CHECK-OUTPUT # Test that the instrumented data makes sense -RUN: llvm-bolt %t.exe -o %t.bolted -data %t.fdata \ -RUN: -reorder-blocks=ext-tsp -reorder-functions=hfsort+ \ -RUN: -print-only=interp -print-finalized +RUN: llvm-bolt %t.exe -o %t.bolted --data %t.fdata \ +RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \ +RUN: --print-only=interp --print-finalized RUN: %t.bolted | FileCheck %s -check-prefix=CHECK-OUTPUT diff --git a/bolt/test/runtime/X86/instrumentation-pie.c b/bolt/test/runtime/X86/instrumentation-pie.c index 51da4a6025a8..6c51f4c8cfb0 100644 --- a/bolt/test/runtime/X86/instrumentation-pie.c +++ b/bolt/test/runtime/X86/instrumentation-pie.c @@ -23,15 +23,15 @@ REQUIRES: system-linux,bolt-runtime RUN: %clang %cflags %s -o %t.exe -Wl,-q -pie -fpie -RUN: llvm-bolt %t.exe -instrument -instrumentation-file=%t.fdata \ +RUN: llvm-bolt %t.exe --instrument --instrumentation-file=%t.fdata \ RUN: -o %t.instrumented # Instrumented program needs to finish returning zero RUN: %t.instrumented 1 2 3 | FileCheck %s -check-prefix=CHECK-OUTPUT # Test that the instrumented data makes sense -RUN: llvm-bolt %t.exe -o %t.bolted -data %t.fdata \ -RUN: -reorder-blocks=ext-tsp -reorder-functions=hfsort+ +RUN: llvm-bolt %t.exe -o %t.bolted --data %t.fdata \ +RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ RUN: %t.bolted 1 2 3 | FileCheck %s -check-prefix=CHECK-OUTPUT diff --git a/bolt/test/runtime/X86/instrumentation-shlib.c b/bolt/test/runtime/X86/instrumentation-shlib.c index 8d5b23e324e9..b59b6dbbad90 100644 --- a/bolt/test/runtime/X86/instrumentation-shlib.c +++ b/bolt/test/runtime/X86/instrumentation-shlib.c @@ -52,7 +52,7 @@ REQUIRES: system-linux,bolt-runtime RUN: %clang %cflags %s -o %t.so -Wl,-q -fpie -fPIC -shared -DLIB RUN: %clang %cflags %s -o %t.exe -Wl,-q -ldl -RUN: llvm-bolt %t.so -instrument -instrumentation-file=%t.so.fdata \ +RUN: llvm-bolt %t.so --instrument --instrumentation-file=%t.so.fdata \ RUN: -o %t.so.instrumented # Program with instrumented shared library needs to finish returning zero @@ -60,8 +60,8 @@ RUN: %t.exe %t.so.instrumented 1 2 | FileCheck %s -check-prefix=CHECK-OUTPUT RUN: test -f %t.so.fdata # Test that the instrumented data makes sense -RUN: llvm-bolt %t.so -o %t.so.bolted -data %t.so.fdata \ -RUN: -reorder-blocks=ext-tsp -reorder-functions=hfsort+ +RUN: llvm-bolt %t.so -o %t.so.bolted --data %t.so.fdata \ +RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ RUN: %t.exe %t.so.bolted 1 2 | FileCheck %s -check-prefix=CHECK-OUTPUT diff --git a/bolt/test/runtime/X86/internal-call-instrument.test b/bolt/test/runtime/X86/internal-call-instrument.test index 8d359bad1441..ebc61cf5a3bf 100644 --- a/bolt/test/runtime/X86/internal-call-instrument.test +++ b/bolt/test/runtime/X86/internal-call-instrument.test @@ -4,7 +4,7 @@ REQUIRES: x86_64-linux,bolt-runtime RUN: %clang -O3 %S/Inputs/internalcall-main.c %S/Inputs/internalcall.S -Wl,-q \ RUN: -o %t.exe -RUN: llvm-bolt -instrument %t.exe -instrumentation-file=%t.fdata \ +RUN: llvm-bolt --instrument %t.exe --instrumentation-file=%t.fdata \ RUN: -o %t -relocs -lite=0 RUN: %t | FileCheck %s diff --git a/bolt/test/runtime/X86/internal-call.test b/bolt/test/runtime/X86/internal-call.test index a09a8a730c31..ecd74e972b8c 100644 --- a/bolt/test/runtime/X86/internal-call.test +++ b/bolt/test/runtime/X86/internal-call.test @@ -6,7 +6,7 @@ REQUIRES: x86_64-linux RUN: %clang -O3 %S/Inputs/internalcall-main.c %S/Inputs/internalcall.S -Wl,-q \ RUN: -o %t.exe -RUN: llvm-bolt %t.exe -o %t -relocs -lite=0 +RUN: llvm-bolt %t.exe -o %t --relocs --lite=0 RUN: %t | FileCheck %s CHECK: Case 1: Result is: DEADBEEF diff --git a/bolt/test/runtime/X86/interp-overwrite-bug.s b/bolt/test/runtime/X86/interp-overwrite-bug.s index eb1f5e8524f2..574061d68a9d 100644 --- a/bolt/test/runtime/X86/interp-overwrite-bug.s +++ b/bolt/test/runtime/X86/interp-overwrite-bug.s @@ -12,7 +12,8 @@ # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags -no-pie -nostartfiles -nostdlib -lc %t.o -o %t.exe -# RUN: llvm-bolt %t.exe -o %t.exe.bolt -relocs=0 -lite=0 -reorder-blocks=reverse +# RUN: llvm-bolt %t.exe -o %t.exe.bolt --relocs=0 --lite=0 \ +# RUN: --reorder-blocks=reverse # RUN: %t.exe.bolt 1 2 3 diff --git a/bolt/test/runtime/X86/retpoline-synthetic.test b/bolt/test/runtime/X86/retpoline-synthetic.test index 4798244575c3..6cae6a85fbe7 100644 --- a/bolt/test/runtime/X86/retpoline-synthetic.test +++ b/bolt/test/runtime/X86/retpoline-synthetic.test @@ -5,7 +5,7 @@ REQUIRES: x86_64-linux RUN: %clangxx %S/Inputs/retpoline_synthetic.cpp -fno-jump-tables -Wl,-q,-znow \ RUN: -O2 -o %t.exe -RUN: llvm-bolt %t.exe -o %t -insert-retpolines -trap-old-code +RUN: llvm-bolt %t.exe -o %t --insert-retpolines --trap-old-code # Check indirect calls in the original binary RUN: llvm-objdump -d %t.exe | FileCheck %s -check-prefix=CHECK-CALL-ORIG diff --git a/bolt/test/runtime/X86/section-reloc-with-addend.s b/bolt/test/runtime/X86/section-reloc-with-addend.s index b2be6afb069f..97b4710db8a1 100755 --- a/bolt/test/runtime/X86/section-reloc-with-addend.s +++ b/bolt/test/runtime/X86/section-reloc-with-addend.s @@ -13,7 +13,7 @@ # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -relocs=1 -print-finalized -print-only=main -o %t.out +# RUN: llvm-bolt %t.exe --relocs=1 --print-finalized --print-only=main -o %t.out # RUN: %t.out 1 2 diff --git a/bolt/test/runtime/X86/shrinkwrapping-alignment.s b/bolt/test/runtime/X86/shrinkwrapping-alignment.s index e1e5f6bfc4ec..1a16b40b0f8b 100755 --- a/bolt/test/runtime/X86/shrinkwrapping-alignment.s +++ b/bolt/test/runtime/X86/shrinkwrapping-alignment.s @@ -13,8 +13,8 @@ # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -relocs=1 -frame-opt=all -print-finalized \ -# RUN: -lite=0 -print-only=main -data %t.fdata -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --relocs=1 --frame-opt=all --print-finalized \ +# RUN: --lite=0 --print-only=main --data %t.fdata -o %t.out | FileCheck %s # RUN: %t.out diff --git a/bolt/test/runtime/X86/shrinkwrapping-lock.s b/bolt/test/runtime/X86/shrinkwrapping-lock.s index 050e8f02c5d7..43853b559f07 100755 --- a/bolt/test/runtime/X86/shrinkwrapping-lock.s +++ b/bolt/test/runtime/X86/shrinkwrapping-lock.s @@ -11,8 +11,8 @@ # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -relocs=1 -frame-opt=all -print-fop \ -# RUN: -print-only=main -data %t.fdata -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --relocs=1 --frame-opt=all --print-fop \ +# RUN: --print-only=main --data %t.fdata -o %t.out | FileCheck %s # RUN: %t.out 1 diff --git a/bolt/test/runtime/X86/shrinkwrapping-pushpop.s b/bolt/test/runtime/X86/shrinkwrapping-pushpop.s index 79641f83d5f4..fc8e3ce9e5c3 100755 --- a/bolt/test/runtime/X86/shrinkwrapping-pushpop.s +++ b/bolt/test/runtime/X86/shrinkwrapping-pushpop.s @@ -12,8 +12,8 @@ # RUN: llvm-strip --strip-unneeded %t.o # RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -relocs=1 -frame-opt=all -print-finalized \ -# RUN: -print-only=main -data %t.fdata -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --relocs=1 --frame-opt=all --print-finalized \ +# RUN: --print-only=main --data %t.fdata -o %t.out | FileCheck %s # RUN: %t.out diff --git a/bolt/test/runtime/X86/tail-duplication-constant-prop.s b/bolt/test/runtime/X86/tail-duplication-constant-prop.s index d5c1b01c0c2d..863c6ff92d22 100644 --- a/bolt/test/runtime/X86/tail-duplication-constant-prop.s +++ b/bolt/test/runtime/X86/tail-duplication-constant-prop.s @@ -4,8 +4,10 @@ # RUN: %s -o %t.o # RUN: link_fdata %s %t.o %t.fdata # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -data %t.fdata -reorder-blocks=ext-tsp -print-finalized \ -# RUN: -tail-duplication=moderate -tail-duplication-minimum-offset=1 -tail-duplication-const-copy-propagation=1 -o %t.out | FileCheck %s +# RUN: llvm-bolt %t.exe --data %t.fdata --reorder-blocks=ext-tsp \ +# RUN: --print-finalized \ +# RUN: --tail-duplication=moderate --tail-duplication-minimum-offset=1 \ +# RUN: --tail-duplication-const-copy-propagation=1 -o %t.out | FileCheck %s # RUN: %t.exe; echo $? # RUN: %t.out; echo $? diff --git a/bolt/test/runtime/X86/three-way-branch-pass.s b/bolt/test/runtime/X86/three-way-branch-pass.s index 953a60e08ef1..bf5273fbbaee 100644 --- a/bolt/test/runtime/X86/three-way-branch-pass.s +++ b/bolt/test/runtime/X86/three-way-branch-pass.s @@ -4,8 +4,8 @@ # RUN: %s -o %t.o # RUN: link_fdata %s %t.o %t.fdata # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -# RUN: llvm-bolt %t.exe -data %t.fdata -print-finalized \ -# RUN: -o %t.out -three-way-branch | FileCheck %s +# RUN: llvm-bolt %t.exe --data %t.fdata --print-finalized \ +# RUN: -o %t.out --three-way-branch | FileCheck %s # RUN: %t.exe # RUN: %t.out diff --git a/bolt/test/runtime/X86/user-func-reorder.c b/bolt/test/runtime/X86/user-func-reorder.c index b027bd28c6d5..fcb92bca1625 100644 --- a/bolt/test/runtime/X86/user-func-reorder.c +++ b/bolt/test/runtime/X86/user-func-reorder.c @@ -29,8 +29,8 @@ REQUIRES: system-linux,bolt-runtime RUN: %clang %cflags -no-pie %s -o %t.exe -Wl,-q -RUN: llvm-bolt %t.exe -relocs=1 -lite -reorder-functions=user \ -RUN: -hugify -function-order=%p/Inputs/user_func_order.txt -o %t +RUN: llvm-bolt %t.exe --relocs=1 --lite --reorder-functions=user \ +RUN: --hugify --function-order=%p/Inputs/user_func_order.txt -o %t RUN: llvm-nm --numeric-sort --print-armap %t | \ RUN: FileCheck %s -check-prefix=CHECK-NM RUN: %t 1 2 3 | FileCheck %s -check-prefix=CHECK-OUTPUT diff --git a/bolt/test/runtime/fptr.test b/bolt/test/runtime/fptr.test index 66b46ffea3a2..c9e9de4ef0b9 100644 --- a/bolt/test/runtime/fptr.test +++ b/bolt/test/runtime/fptr.test @@ -1,7 +1,7 @@ # Make sure BOLT correctly updates values based on function pointer. RUN: %clang %cflags -no-pie %p/Inputs/fptr.c -Wl,-q -o %t.exe -RUN: llvm-bolt %t.exe -o %t -lite=0 +RUN: llvm-bolt %t.exe -o %t --lite=0 RUN: %t | FileCheck %s CHECK: Global = 0x[[#%x,ADDR:]] diff --git a/bolt/test/runtime/iplt.c b/bolt/test/runtime/iplt.c index fb6420f828f6..b0e2e6d25070 100644 --- a/bolt/test/runtime/iplt.c +++ b/bolt/test/runtime/iplt.c @@ -2,7 +2,7 @@ // RUN: %clang %cflags -no-pie %s -fuse-ld=lld \ // RUN: -o %t.exe -Wl,-q -// RUN: llvm-bolt %t.exe -o %t.bolt.exe -use-old-text=0 -lite=0 +// RUN: llvm-bolt %t.exe -o %t.bolt.exe --use-old-text=0 --lite=0 // RUN: %t.bolt.exe | FileCheck %s // CHECK: foo diff --git a/bolt/test/runtime/meta-merge-fdata.test b/bolt/test/runtime/meta-merge-fdata.test index acd2f6b1a8bd..57a8a54dcc26 100644 --- a/bolt/test/runtime/meta-merge-fdata.test +++ b/bolt/test/runtime/meta-merge-fdata.test @@ -7,7 +7,8 @@ REQUIRES: x86_64-linux # - Direct branches # - Unmapped calls coming from uninstrumented code (libc) # - Direct calls -RUN: llvm-bolt merge-fdata -o %t.inst -instrument -instrumentation-file=%t.fdata +RUN: llvm-bolt merge-fdata -o %t.inst --instrument \ +RUN: --instrumentation-file=%t.fdata # Execute with no input RUN: %t.inst --version @@ -19,9 +20,10 @@ RUN: cat %t.fdata1 | FileCheck %s --check-prefix=CHECK-FDATA CHECK-FDATA: 0 [unknown] 0 1 _start 0 0 1 # Check that BOLT works with this profile -RUN: llvm-bolt merge-fdata -o %t.bolt -data %t.fdata1 \ -RUN: -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions=3 | \ -RUN: FileCheck %s --check-prefix=CHECK-BOLT1 +RUN: llvm-bolt merge-fdata -o %t.bolt --data %t.fdata1 \ +RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \ +RUN: --split-functions=3 \ +RUN: | FileCheck %s --check-prefix=CHECK-BOLT1 CHECK-BOLT1-NOT: invalid (possibly stale) profile # Execute again @@ -30,7 +32,7 @@ RUN: mv %t.fdata %t.fdata2 # Check profile coverage RUN: llvm-boltdiff merge-fdata merge-fdata \ -RUN: -data %t.fdata1 -data2 %t.fdata2 -display-count=20 | \ +RUN: --data %t.fdata1 --data2 %t.fdata2 --display-count=20 | \ RUN: FileCheck %s --check-prefix=CHECK-BOLTDIFF CHECK-BOLTDIFF: Inputs share [[#]] functions @@ -40,9 +42,10 @@ RUN: %t.inst %t.fdata1 %t.fdata2 > %t.fdata.inst RUN: cmp %t.fdata.base %t.fdata.inst # Optimize using merged fdata -RUN: llvm-bolt merge-fdata -o %t.opt -data %t.fdata.base \ -RUN: -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions=3 | \ -RUN: FileCheck %s --check-prefix=CHECK-BOLT2 +RUN: llvm-bolt merge-fdata -o %t.opt --data %t.fdata.base \ +RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \ +RUN: --split-functions=3 \ +RUN: | FileCheck %s --check-prefix=CHECK-BOLT2 CHECK-BOLT2-NOT: invalid (possibly stale) profile # Check that optimized binary produces the same result diff --git a/bolt/test/runtime/plt-gnu-ld.test b/bolt/test/runtime/plt-gnu-ld.test index c1d945884733..50bdc7125ea5 100644 --- a/bolt/test/runtime/plt-gnu-ld.test +++ b/bolt/test/runtime/plt-gnu-ld.test @@ -6,7 +6,7 @@ // RUN: %clang %cflags %p/../Inputs/plt.c -fuse-ld=bfd \ // RUN: -o %t.bfd.exe -Wl,-q -// RUN: llvm-bolt %t.bfd.exe -o %t.bfd.bolt.exe -use-old-text=0 -lite=0 +// RUN: llvm-bolt %t.bfd.exe -o %t.bfd.bolt.exe --use-old-text=0 --lite=0 // RUN: %t.bfd.bolt.exe | FileCheck %s // CHECK: Test completed diff --git a/bolt/test/runtime/plt-lld.test b/bolt/test/runtime/plt-lld.test index b52652f606dd..b505a191f90a 100644 --- a/bolt/test/runtime/plt-lld.test +++ b/bolt/test/runtime/plt-lld.test @@ -4,13 +4,13 @@ // Non-PIE: RUN: %clang %cflags -no-pie %p/../Inputs/plt.c -fuse-ld=lld \ RUN: -o %t.lld.exe -Wl,-q -RUN: llvm-bolt %t.lld.exe -o %t.lld.bolt.exe -use-old-text=0 -lite=0 +RUN: llvm-bolt %t.lld.exe -o %t.lld.bolt.exe --use-old-text=0 --lite=0 RUN: %t.lld.bolt.exe | FileCheck %s // PIE: RUN: %clang %cflags -fPIC -pie %p/../Inputs/plt.c -fuse-ld=lld \ RUN: -o %t.lld.pie.exe -Wl,-q -RUN: llvm-bolt %t.lld.pie.exe -o %t.lld.bolt.pie.exe -use-old-text=0 -lite=0 +RUN: llvm-bolt %t.lld.pie.exe -o %t.lld.bolt.pie.exe --use-old-text=0 --lite=0 RUN: %t.lld.bolt.pie.exe | FileCheck %s CHECK: Test completed