You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ICF runs before BPSectionOrderer. When a section is ICF'ed, it seems
that the original sections are marked as not live, but are still kept
around. Prior to this patch, those ICF'ed sections would be passed to BP
and ordered before being skipped when writing the output. Now, these
sections are no longer passed to BP, saving runtime and possibly
improving BP's output.
In a large binary, I found that the number of sections ordered using BP
decreased, while the number of duplicate sections drastically decreased
as expected.
```
Functions for startup: 50755 -> 50520
Functions for compression: 165734 -> 105328
Duplicate functions: 1827231 -> 55230
```
# BP-COMPRESSION-FUNC: Ordered 7 sections using balanced partitioning
52
+
# BP-COMPRESSION-FUNC: Ordered 9 sections using balanced partitioning
53
+
# BP-COMPRESSION-ICF-FUNC: Ordered 8 sections using balanced partitioning
50
54
# BP-COMPRESSION-DATA: Ordered 9 sections using balanced partitioning
51
-
# BP-COMPRESSION-BOTH: Ordered 16 sections using balanced partitioning
55
+
# BP-COMPRESSION-BOTH: Ordered 18 sections using balanced partitioning
52
56
53
57
#--- a.proftext
54
58
:ir
@@ -114,17 +118,24 @@ int d3[] = {5,6,7,8};
114
118
int d2[] = {7,8,9,10};
115
119
int d1[] = {3,4,5,6};
116
120
121
+
// used is to suppress compiler garbage collection in ELF; retain is to suppress linker garbage collection; used is not needed for non-internal linkage symbols
122
+
// used is for both compiler/linker GC in Mach-O; retain is ignored for Mach-O
0 commit comments