File: cgprofile-bad-clusters.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (70 lines) | stat: -rw-r--r-- 1,628 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# REQUIRES: x86
# This test checks that CallGraphSort ignores edges that would form "bad"
# clusters.

# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: echo "A C 1" > %t.call_graph
# RUN: echo "E B 4" >> %t.call_graph
# RUN: echo "C D 2" >> %t.call_graph
# RUN: echo "B D 1" >> %t.call_graph
# RUN: echo "F G 6" >> %t.call_graph
# RUN: echo "G H 5" >> %t.call_graph
# RUN: echo "H I 4" >> %t.call_graph
# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s

    .section    .text.A,"ax",@progbits
    .globl A
A:
    retq

    .section    .text.D,"ax",@progbits
D:
    .fill 1000, 1, 0

    .section    .text.E,"ax",@progbits
E:
    retq

    .section    .text.C,"ax",@progbits
C:
    retq

    .section    .text.B,"ax",@progbits
B:
    .fill 1000, 1, 0

    .section    .text.F,"ax",@progbits
F:
    .fill (1024 * 1024) - 1, 1, 0

    .section    .text.G,"ax",@progbits
G:
    retq

    .section    .text.H,"ax",@progbits
H:
    retq

    .section    .text.I,"ax",@progbits
I:
    .fill 13, 1, 0

# CHECK:          Name: D
# CHECK-NEXT:     Value: 0x201519
# CHECK:          Name: E
# CHECK-NEXT:     Value: 0x201130
# CHECK:          Name: C
# CHECK-NEXT:     Value: 0x20112F
# CHECK:          Name: B
# CHECK-NEXT:     Value: 0x201131
# CHECK:          Name: F
# CHECK-NEXT:     Value: 0x201901
# CHECK:          Name: G
# CHECK-NEXT:     Value: 0x301900
# CHECK:          Name: H
# CHECK-NEXT:     Value: 0x201120
# CHECK:          Name: I
# CHECK-NEXT:     Value: 0x201121
# CHECK:          Name: A
# CHECK-NEXT:     Value: 0x20112E