[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / cgprofile-bad-clusters.s
blob0c6068bfc625b3279d7c5f7e8f001a88f5b71b30
1 # REQUIRES: x86
2 # This test checks that CallGraphSort ignores edges that would form "bad"
3 # clusters.
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
6 # RUN: echo "A C 1" > %t.call_graph
7 # RUN: echo "E B 4" >> %t.call_graph
8 # RUN: echo "C D 2" >> %t.call_graph
9 # RUN: echo "B D 1" >> %t.call_graph
10 # RUN: echo "F G 6" >> %t.call_graph
11 # RUN: echo "G H 5" >> %t.call_graph
12 # RUN: echo "H I 4" >> %t.call_graph
13 # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=hfsort -o %t2
14 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
16 .section .text.A,"ax",@progbits
17 .globl A
19 retq
21 .section .text.D,"ax",@progbits
23 .fill 1000, 1, 0
25 .section .text.E,"ax",@progbits
27 retq
29 .section .text.C,"ax",@progbits
31 retq
33 .section .text.B,"ax",@progbits
35 .fill 1000, 1, 0
37 .section .text.F,"ax",@progbits
39 .fill (1024 * 1024) - 1, 1, 0
41 .section .text.G,"ax",@progbits
43 retq
45 .section .text.H,"ax",@progbits
47 retq
49 .section .text.I,"ax",@progbits
51 .fill 13, 1, 0
53 # CHECK: Name: D
54 # CHECK-NEXT: Value: 0x201519
55 # CHECK: Name: E
56 # CHECK-NEXT: Value: 0x201130
57 # CHECK: Name: C
58 # CHECK-NEXT: Value: 0x20112F
59 # CHECK: Name: B
60 # CHECK-NEXT: Value: 0x201131
61 # CHECK: Name: F
62 # CHECK-NEXT: Value: 0x201901
63 # CHECK: Name: G
64 # CHECK-NEXT: Value: 0x301900
65 # CHECK: Name: H
66 # CHECK-NEXT: Value: 0x201120
67 # CHECK: Name: I
68 # CHECK-NEXT: Value: 0x201121
69 # CHECK: Name: A
70 # CHECK-NEXT: Value: 0x20112E