2018-04-18 07:30:05 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
|
|
|
# RUN: ld.lld -e A %t -o %t2
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=NOSORT
|
2018-04-18 07:30:05 +08:00
|
|
|
|
|
|
|
# RUN: echo "A B 10" > %t.call_graph
|
|
|
|
# RUN: echo "A B 10" >> %t.call_graph
|
|
|
|
# RUN: echo "Aa B 80" >> %t.call_graph
|
|
|
|
# RUN: echo "A C 40" >> %t.call_graph
|
|
|
|
# RUN: echo "B C 30" >> %t.call_graph
|
|
|
|
# RUN: echo "C D 90" >> %t.call_graph
|
|
|
|
# RUN: echo "PP TS 100" >> %t.call_graph
|
|
|
|
# RUN: echo "_init2 _init 24567837" >> %t.call_graph
|
|
|
|
# RUN: echo "TS QC 9001" >> %t.call_graph
|
|
|
|
# RUN: echo "TooManyPreds0 TooManyPreds 10" >> %t.call_graph
|
|
|
|
# RUN: echo "TooManyPreds1 TooManyPreds 10" >> %t.call_graph
|
|
|
|
# RUN: echo "TooManyPreds2 TooManyPreds 10" >> %t.call_graph
|
|
|
|
# RUN: echo "TooManyPreds3 TooManyPreds 10" >> %t.call_graph
|
|
|
|
# RUN: echo "TooManyPreds4 TooManyPreds 10" >> %t.call_graph
|
|
|
|
# RUN: echo "TooManyPreds5 TooManyPreds 10" >> %t.call_graph
|
|
|
|
# RUN: echo "TooManyPreds6 TooManyPreds 10" >> %t.call_graph
|
|
|
|
# RUN: echo "TooManyPreds7 TooManyPreds 10" >> %t.call_graph
|
|
|
|
# RUN: echo "TooManyPreds8 TooManyPreds 10" >> %t.call_graph
|
|
|
|
# RUN: echo "TooManyPreds9 TooManyPreds 10" >> %t.call_graph
|
|
|
|
# RUN: echo "TooManyPreds10 TooManyPreds 11" >> %t.call_graph
|
|
|
|
# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
|
2018-04-18 07:30:05 +08:00
|
|
|
|
|
|
|
.section .text.D,"ax",@progbits
|
|
|
|
D:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.C,"ax",@progbits
|
|
|
|
.globl C
|
|
|
|
C:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.B,"ax",@progbits
|
|
|
|
.globl B
|
|
|
|
B:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.A,"ax",@progbits
|
|
|
|
.globl A
|
|
|
|
A:
|
|
|
|
Aa:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .ponies,"ax",@progbits,unique,1
|
|
|
|
.globl TS
|
|
|
|
TS:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .ponies,"ax",@progbits,unique,2
|
|
|
|
.globl PP
|
|
|
|
PP:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .other,"ax",@progbits,unique,1
|
|
|
|
.globl QC
|
|
|
|
QC:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .other,"ax",@progbits,unique,2
|
|
|
|
.globl GB
|
|
|
|
GB:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .init,"ax",@progbits,unique,1
|
|
|
|
.globl _init
|
|
|
|
_init:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .init,"ax",@progbits,unique,2
|
|
|
|
.globl _init2
|
|
|
|
_init2:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.TooManyPreds,"ax",@progbits
|
|
|
|
TooManyPreds:
|
|
|
|
retq
|
|
|
|
retq
|
|
|
|
retq
|
|
|
|
retq
|
|
|
|
retq
|
|
|
|
retq
|
|
|
|
retq
|
|
|
|
retq
|
|
|
|
retq
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.TooManyPreds0,"ax",@progbits
|
|
|
|
TooManyPreds0:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.TooManyPreds1,"ax",@progbits
|
|
|
|
TooManyPreds1:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.TooManyPreds2,"ax",@progbits
|
|
|
|
TooManyPreds2:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.TooManyPreds3,"ax",@progbits
|
|
|
|
TooManyPreds3:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.TooManyPreds4,"ax",@progbits
|
|
|
|
TooManyPreds4:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.TooManyPreds5,"ax",@progbits
|
|
|
|
TooManyPreds5:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.TooManyPreds6,"ax",@progbits
|
|
|
|
TooManyPreds6:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.TooManyPreds7,"ax",@progbits
|
|
|
|
TooManyPreds7:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.TooManyPreds8,"ax",@progbits
|
|
|
|
TooManyPreds8:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.TooManyPreds9,"ax",@progbits
|
|
|
|
TooManyPreds9:
|
|
|
|
retq
|
|
|
|
|
|
|
|
.section .text.TooManyPreds10,"ax",@progbits
|
|
|
|
TooManyPreds10:
|
|
|
|
retq
|
|
|
|
|
|
|
|
# CHECK: Name: D
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Value: 0x201123
|
2018-04-18 07:30:05 +08:00
|
|
|
# CHECK: Name: TooManyPreds
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Value: 0x201124
|
2018-04-18 07:30:05 +08:00
|
|
|
# CHECK: Name: TooManyPreds10
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Value: 0x201138
|
2018-04-18 07:30:05 +08:00
|
|
|
# CHECK: Name: A
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Value: 0x201120
|
2018-04-18 07:30:05 +08:00
|
|
|
# CHECK: Name: B
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Value: 0x201121
|
2018-04-18 07:30:05 +08:00
|
|
|
# CHECK: Name: C
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Value: 0x201122
|
2018-04-18 07:30:05 +08:00
|
|
|
# CHECK: Name: GB
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Value: 0x20113F
|
2018-04-18 07:30:05 +08:00
|
|
|
# CHECK: Name: PP
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Value: 0x20113C
|
2018-04-18 07:30:05 +08:00
|
|
|
# CHECK: Name: QC
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Value: 0x20113E
|
2018-04-18 07:30:05 +08:00
|
|
|
# CHECK: Name: TS
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Value: 0x20113D
|
2018-04-18 07:30:05 +08:00
|
|
|
# CHECK: Name: _init
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Value: 0x201140
|
2018-04-18 07:30:05 +08:00
|
|
|
# CHECK: Name: _init2
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Value: 0x201141
|
2018-04-18 07:30:05 +08:00
|
|
|
|
|
|
|
# NOSORT: Name: D
|
2019-09-16 15:05:34 +08:00
|
|
|
# NOSORT-NEXT: Value: 0x201120
|
2018-04-18 07:30:05 +08:00
|
|
|
# NOSORT: Name: TooManyPreds
|
2019-09-16 15:05:34 +08:00
|
|
|
# NOSORT-NEXT: Value: 0x201124
|
2018-04-18 07:30:05 +08:00
|
|
|
# NOSORT: Name: TooManyPreds10
|
2019-09-16 15:05:34 +08:00
|
|
|
# NOSORT-NEXT: Value: 0x201138
|
2018-04-18 07:30:05 +08:00
|
|
|
# NOSORT: Name: A
|
2019-09-16 15:05:34 +08:00
|
|
|
# NOSORT-NEXT: Value: 0x201123
|
2018-04-18 07:30:05 +08:00
|
|
|
# NOSORT: Name: B
|
2019-09-16 15:05:34 +08:00
|
|
|
# NOSORT-NEXT: Value: 0x201122
|
2018-04-18 07:30:05 +08:00
|
|
|
# NOSORT: Name: C
|
2019-09-16 15:05:34 +08:00
|
|
|
# NOSORT-NEXT: Value: 0x201121
|
2018-04-18 07:30:05 +08:00
|
|
|
# NOSORT: Name: GB
|
2019-09-16 15:05:34 +08:00
|
|
|
# NOSORT-NEXT: Value: 0x20113C
|
2018-04-18 07:30:05 +08:00
|
|
|
# NOSORT: Name: PP
|
2019-09-16 15:05:34 +08:00
|
|
|
# NOSORT-NEXT: Value: 0x20113A
|
2018-04-18 07:30:05 +08:00
|
|
|
# NOSORT: Name: QC
|
2019-09-16 15:05:34 +08:00
|
|
|
# NOSORT-NEXT: Value: 0x20113B
|
2018-04-18 07:30:05 +08:00
|
|
|
# NOSORT: Name: TS
|
2019-09-16 15:05:34 +08:00
|
|
|
# NOSORT-NEXT: Value: 0x201139
|
2018-04-18 07:30:05 +08:00
|
|
|
# NOSORT: Name: _init
|
2019-09-16 15:05:34 +08:00
|
|
|
# NOSORT-NEXT: Value: 0x20113D
|
2018-04-18 07:30:05 +08:00
|
|
|
# NOSORT: Name: _init2
|
2019-09-16 15:05:34 +08:00
|
|
|
# NOSORT-NEXT: Value: 0x20113E
|