File tree Expand file tree Collapse file tree 8 files changed +12
-18
lines changed Expand file tree Collapse file tree 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) {
10951095}
10961096
10971097static 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 " );
10991099 if (s == " hfsort" )
11001100 return CGProfileSortKind::Hfsort;
11011101 if (s == " cdsort" )
Original file line number Diff line number Diff line change @@ -128,9 +128,9 @@ may be:
128128.It Cm none
129129Ignore call graph profile.
130130.It Cm hfsort
131- Use hfsort (default) .
131+ Use hfsort.
132132.It Cm cdsort
133- Use cdsort.
133+ Use cdsort (default) .
134134.El
135135.Pp
136136.It Fl -color-diagnostics Ns = Ns Ar value
Original file line number Diff line number Diff line change 1010# RUN: echo "F G 6" >> %t.call_graph
1111# RUN: echo "G H 5" >> %t.call_graph
1212# 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
1414# RUN: llvm-readobj --symbols %t2 | FileCheck %s
1515
1616 .section .text .A,"ax" ,@progbits
Original file line number Diff line number Diff line change 55# RUN: echo "A B 100" > %t.call_graph
66# RUN: echo "A C 40" >> %t.call_graph
77# 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
99# 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
1111# RUN: llvm-readobj --symbols %t2.out | FileCheck %s --check-prefix=NOICF
1212
1313 .section .text .D,"ax" ,@progbits
Original file line number Diff line number Diff line change 55# RUN: echo "B C 50" >> %t.call_graph
66# RUN: echo "C D 40" >> %t.call_graph
77# 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
99# RUN: FileCheck %s --input-file %t3
1010
1111# CHECK: B
3232.globl D
3333D:
3434 nop
35-
36-
37-
Original file line number Diff line number Diff line change 33# REQUIRES: x86
44
55# 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
77# RUN: llvm-nm --no-sort %t | FileCheck %s
88# RUN: ld.lld --no-call-graph-profile-sort %t.o -o %t
99# RUN: llvm-nm --no-sort %t | FileCheck %s --check-prefix=NO-CG
Original file line number Diff line number Diff line change 55# RUN: echo "B C 50" >> %t.call_graph
66# RUN: echo "C D 40" >> %t.call_graph
77# 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
99# RUN: ld.lld -e A %t --symbol-ordering-file %t3 -o %t2
1010# RUN: llvm-readobj --symbols %t2 | FileCheck %s
1111
3737.globl D
3838D:
3939 nop
40-
41-
42-
Original file line number Diff line number Diff line change 2626# RUN: echo "TooManyPreds10 TooManyPreds 11" >> %t.call_graph
2727# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=hfsort -o %t2
2828# 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
3229
3330# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=cdsort -o %t2
3431# 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
3535
3636# RUN: not ld.lld -e A %t --call-graph-ordering-file %t.call_graph --call-graph-profile-sort=sort \
3737# RUN: -o /dev/null 2>&1 | FileCheck %s --check-prefix=UNKNOWN
You can’t perform that action at this time.
0 commit comments