llvm-project
61 строка · 1.3 Кб
1# REQUIRES: x86
2# This test checks that CallGraphSort ignores edges that would form "bad"
3# clusters.
4
5# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-win32 %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: lld-link /subsystem:console /entry:A %t /call-graph-ordering-file:%t.call_graph /out:%t2 /debug:symtab
14# RUN: llvm-nm --numeric-sort %t2 | FileCheck %s
15
16.section .text,"ax",one_only,A
17.globl A
18A:
19retq
20
21.section .text,"ax",one_only,D
22D:
23.fill 1000, 1, 0
24
25.section .text,"ax",one_only,E
26E:
27retq
28
29.section .text,"ax",one_only,C
30C:
31retq
32
33.section .text,"ax",one_only,B
34B:
35.fill 1000, 1, 0
36
37.section .text,"ax",one_only,F
38F:
39.fill (1024 * 1024) - 1, 1, 0
40
41.section .text,"ax",one_only,G
42G:
43retq
44
45.section .text,"ax",one_only,H
46H:
47retq
48
49.section .text,"ax",one_only,I
50I:
51.fill 13, 1, 0
52
53# CHECK: 140001000 t H
54# CHECK: 140001001 t I
55# CHECK: 14000100e T A
56# CHECK: 14000100f t C
57# CHECK: 140001010 t E
58# CHECK: 140001011 t B
59# CHECK: 1400013f9 t D
60# CHECK: 1400017e1 t F
61# CHECK: 1401017e0 t G
62