diff --git a/bolt/test/AArch64/asm-func-debug.test b/bolt/test/AArch64/asm-func-debug.test --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 @@ // 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 @@ // 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- a/bolt/test/X86/avx512-trap.test +++ b/bolt/test/X86/avx512-trap.test @@ -7,11 +7,11 @@ 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- a/bolt/test/X86/fallthrough-to-noop.test +++ b/bolt/test/X86/fallthrough-to-noop.test @@ -6,8 +6,8 @@ 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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/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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- a/bolt/test/X86/jump-table-footprint-reduction.test +++ b/bolt/test/X86/jump-table-footprint-reduction.test @@ -6,8 +6,8 @@ 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 --- a/bolt/test/X86/jump-table-icp.test +++ b/bolt/test/X86/jump-table-icp.test @@ -4,14 +4,14 @@ 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- a/bolt/test/X86/loop-nest.test +++ b/bolt/test/X86/loop-nest.test @@ -6,8 +6,9 @@ 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 --- 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 --- a/bolt/test/X86/no-entry-reordering.test +++ b/bolt/test/X86/no-entry-reordering.test @@ -5,7 +5,7 @@ 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- a/bolt/test/X86/remove-unused.test +++ b/bolt/test/X86/remove-unused.test @@ -5,9 +5,9 @@ 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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-icf.s b/bolt/test/X86/split-func-icf.s --- a/bolt/test/X86/split-func-icf.s +++ b/bolt/test/X86/split-func-icf.s @@ -8,7 +8,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-DAG: BOLT-INFO: marking main2.cold.1(*2) as a fragment of main diff --git a/bolt/test/X86/split-func-jump-table-fragment-noparent.s b/bolt/test/X86/split-func-jump-table-fragment-noparent.s --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- a/bolt/test/keep-aranges.test +++ b/bolt/test/keep-aranges.test @@ -5,7 +5,7 @@ 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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: 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 --- 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 --- a/bolt/test/runtime/X86/exceptions-pic.test +++ b/bolt/test/runtime/X86/exceptions-pic.test @@ -4,7 +4,7 @@ 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 --- 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 --- a/bolt/test/runtime/X86/fdata-escape-chars.ll +++ b/bolt/test/runtime/X86/fdata-escape-chars.ll @@ -56,18 +56,18 @@ ; 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- a/bolt/test/runtime/X86/instrumentation-indirect.c +++ b/bolt/test/runtime/X86/instrumentation-indirect.c @@ -40,24 +40,24 @@ 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 --- a/bolt/test/runtime/X86/instrumentation-pie.c +++ b/bolt/test/runtime/X86/instrumentation-pie.c @@ -23,15 +23,15 @@ 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 --- a/bolt/test/runtime/X86/instrumentation-shlib.c +++ b/bolt/test/runtime/X86/instrumentation-shlib.c @@ -52,7 +52,7 @@ 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: 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 --- a/bolt/test/runtime/X86/internal-call-instrument.test +++ b/bolt/test/runtime/X86/internal-call-instrument.test @@ -4,7 +4,7 @@ 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 --- a/bolt/test/runtime/X86/internal-call.test +++ b/bolt/test/runtime/X86/internal-call.test @@ -6,7 +6,7 @@ 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 --- 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 --- a/bolt/test/runtime/X86/retpoline-synthetic.test +++ b/bolt/test/runtime/X86/retpoline-synthetic.test @@ -5,7 +5,7 @@ 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- 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 --- a/bolt/test/runtime/X86/user-func-reorder.c +++ b/bolt/test/runtime/X86/user-func-reorder.c @@ -29,8 +29,8 @@ 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 --- 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 --- 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 --- a/bolt/test/runtime/meta-merge-fdata.test +++ b/bolt/test/runtime/meta-merge-fdata.test @@ -7,7 +7,8 @@ # - 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 @@ 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 @@ # 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: 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 --- 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 --- 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