Skip to content

Commit e669603

Browse files
committed
[BOLT] Enable hugify for AArch64
Make hugify tests target independent
1 parent 28bed54 commit e669603

File tree

7 files changed

+28
-92
lines changed

7 files changed

+28
-92
lines changed

bolt/test/runtime/AArch64/hugify.c

Lines changed: 0 additions & 33 deletions
This file was deleted.

bolt/test/runtime/AArch64/section-order.test

Lines changed: 0 additions & 10 deletions
This file was deleted.

bolt/test/runtime/X86/Inputs/user_func_order.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

bolt/test/runtime/X86/user-func-reorder.c

Lines changed: 0 additions & 44 deletions
This file was deleted.

bolt/test/runtime/X86/hugify.c renamed to bolt/test/runtime/hugify.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,28 @@ int main(int argc, char **argv) {
1111
REQUIRES: system-linux,bolt-runtime
1212
1313
RUN: %clang %cflags -no-pie %s -o %t.nopie.exe -Wl,-q
14-
RUN: %clang %cflags -fpic -pie %s -o %t.pie.exe -Wl,-q
14+
RUN: %clang %cflags %s -o %t.pie.exe -Wl,-q
1515
1616
RUN: llvm-bolt %t.nopie.exe --lite=0 -o %t.nopie --hugify
1717
RUN: llvm-bolt %t.pie.exe --lite=0 -o %t.pie --hugify
1818
19+
RUN: llvm-nm --numeric-sort --print-armap %t.nopie | \
20+
RUN: FileCheck %s -check-prefix=CHECK-NM
1921
RUN: %t.nopie | FileCheck %s -check-prefix=CHECK-NOPIE
2022
21-
CHECK-NOPIE: Hello world
22-
23+
RUN: llvm-nm --numeric-sort --print-armap %t.pie | \
24+
RUN: FileCheck %s -check-prefix=CHECK-NM
2325
RUN: %t.pie | FileCheck %s -check-prefix=CHECK-PIE
2426
27+
CHECK-NM: W __hot_start
28+
CHECK-NM-NEXT: T _start
29+
CHECK-NM: T main
30+
CHECK-NM: W __hot_end
31+
CHECK-NM: t __bolt_hugify_start_program
32+
CHECK-NM-NEXT: W __bolt_runtime_start
33+
34+
CHECK-NOPIE: Hello world
35+
2536
CHECK-PIE: Hello world
2637
2738
*/

bolt/test/runtime/AArch64/user-func-reorder.c renamed to bolt/test/runtime/user-func-reorder.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,28 @@ RUN: %clang %cflags -no-pie %s -o %t.exe -Wl,-q
2727
2828
RUN: llvm-bolt %t.exe --relocs=1 --lite --reorder-functions=user \
2929
RUN: --hugify --function-order=%p/Inputs/user_func_order.txt -o %t
30+
RUN: llvm-bolt %t.exe --relocs=1 --lite --reorder-functions=user \
31+
RUN: --function-order=%p/Inputs/user_func_order.txt -o %t.nohugify
3032
RUN: llvm-nm --numeric-sort --print-armap %t | \
3133
RUN: FileCheck %s -check-prefix=CHECK-NM
3234
RUN: %t 1 2 3 | FileCheck %s -check-prefix=CHECK-OUTPUT
35+
RUN: llvm-nm --numeric-sort --print-armap %t.nohugify | \
36+
RUN: FileCheck %s -check-prefix=CHECK-NM-NOHUGIFY
37+
RUN: %t.nohugify 1 2 3 | FileCheck %s -check-prefix=CHECK-OUTPUT-NOHUGIFY
38+
3339
3440
CHECK-NM: W __hot_start
3541
CHECK-NM: T main
3642
CHECK-NM-NEXT: T fib
3743
CHECK-NM-NEXT: W __hot_end
44+
CHECK-NM: t __bolt_hugify_start_program
45+
CHECK-NM-NEXT: W __bolt_runtime_start
46+
47+
CHECK-NM-NOHUGIFY: W __hot_start
48+
CHECK-NM-NOHUGIFY: T main
49+
CHECK-NM-NOHUGIFY-NEXT: T fib
50+
CHECK-NM-NOHUGIFY-NEXT: W __hot_end
3851
3952
CHECK-OUTPUT: fib(4) = 3
53+
CHECK-OUTPUT-NOHUGIFY: fib(4) = 3
4054
*/

0 commit comments

Comments
 (0)