File tree 8 files changed +12
-18
lines changed 8 files changed +12
-18
lines changed Original file line number Diff line number Diff line change @@ -1095,7 +1095,7 @@ static void ltoValidateAllVtablesHaveTypeInfos(opt::InputArgList &args) {
1095
1095
}
1096
1096
1097
1097
static CGProfileSortKind getCGProfileSortKind (opt::InputArgList &args) {
1098
- StringRef s = args.getLastArgValue (OPT_call_graph_profile_sort, " hfsort " );
1098
+ StringRef s = args.getLastArgValue (OPT_call_graph_profile_sort, " cdsort " );
1099
1099
if (s == " hfsort" )
1100
1100
return CGProfileSortKind::Hfsort;
1101
1101
if (s == " cdsort" )
Original file line number Diff line number Diff line change @@ -128,9 +128,9 @@ may be:
128
128
.It Cm none
129
129
Ignore call graph profile.
130
130
.It Cm hfsort
131
- Use hfsort (default) .
131
+ Use hfsort.
132
132
.It Cm cdsort
133
- Use cdsort.
133
+ Use cdsort (default) .
134
134
.El
135
135
.Pp
136
136
.It Fl -color-diagnostics Ns = Ns Ar value
Original file line number Diff line number Diff line change 10
10
# RUN: echo "F G 6" >> %t.call_graph
11
11
# RUN: echo "G H 5" >> %t.call_graph
12
12
# RUN: echo "H I 4" >> %t.call_graph
13
- # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2
13
+ # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=hfsort - o %t2
14
14
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
15
15
16
16
.section .text .A,"ax" ,@progbits
Original file line number Diff line number Diff line change 5
5
# RUN: echo "A B 100" > %t.call_graph
6
6
# RUN: echo "A C 40" >> %t.call_graph
7
7
# RUN: echo "C D 61" >> %t.call_graph
8
- # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t.out -icf=all
8
+ # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=hfsort - o %t.out -icf=all
9
9
# RUN: llvm-readobj --symbols %t.out | FileCheck %s
10
- # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2.out
10
+ # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=hfsort - o %t2.out
11
11
# RUN: llvm-readobj --symbols %t2.out | FileCheck %s --check-prefix=NOICF
12
12
13
13
.section .text .D,"ax" ,@progbits
Original file line number Diff line number Diff line change 5
5
# RUN: echo "B C 50" >> %t.call_graph
6
6
# RUN: echo "C D 40" >> %t.call_graph
7
7
# RUN: echo "D B 10" >> %t.call_graph
8
- # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2 --print-symbol-order=%t3
8
+ # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2 --call-graph-profile-sort=hfsort -- print-symbol-order=%t3
9
9
# RUN: FileCheck %s --input-file %t3
10
10
11
11
# CHECK: B
32
32
.globl D
33
33
D:
34
34
nop
35
-
36
-
37
-
Original file line number Diff line number Diff line change 3
3
# REQUIRES: x86
4
4
5
5
# RUN: yaml2obj %s -o %t.o
6
- # RUN: ld.lld %t.o -o %t
6
+ # RUN: ld.lld --call-graph-profile-sort=hfsort %t.o -o %t
7
7
# RUN: llvm-nm --no-sort %t | FileCheck %s
8
8
# RUN: ld.lld --no-call-graph-profile-sort %t.o -o %t
9
9
# RUN: llvm-nm --no-sort %t | FileCheck %s --check-prefix=NO-CG
Original file line number Diff line number Diff line change 5
5
# RUN: echo "B C 50" >> %t.call_graph
6
6
# RUN: echo "C D 40" >> %t.call_graph
7
7
# RUN: echo "D B 10" >> %t.call_graph
8
- # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2 --print-symbol-order=%t3
8
+ # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2 --call-graph-profile-sort=hfsort -- print-symbol-order=%t3
9
9
# RUN: ld.lld -e A %t --symbol-ordering-file %t3 -o %t2
10
10
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
11
11
37
37
.globl D
38
38
D:
39
39
nop
40
-
41
-
42
-
Original file line number Diff line number Diff line change 26
26
# RUN: echo "TooManyPreds10 TooManyPreds 11" >> %t.call_graph
27
27
# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=hfsort -o %t2
28
28
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
29
- ## --call-graph-profile-sort=hfsort is the default.
30
- # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2b
31
- # RUN: cmp %t2 %t2b
32
29
33
30
# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=cdsort -o %t2
34
31
# RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=CDSORT
32
+ ## --call-graph-profile-sort=cdsort is the default.
33
+ # RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2b
34
+ # RUN: cmp %t2 %t2b
35
35
36
36
# RUN: not ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=sort \
37
37
# RUN: -o /dev/null 2>&1 | FileCheck %s --check-prefix=UNKNOWN
You can’t perform that action at this time.
0 commit comments