Roland McGrath wrote:
> There are an awful lot of nested function calls. Although they
are
> marked inline, are we sure gcc sees through that?
I don't think we have looked (probably not even tried an -O2 build).
When I pass no CFLAGS to configure, -O2 gets picked by default.
Petr, can you eyeball the generated code, compare text sizes, etc.?
On x86_64, -O1 through -O3, overall change in .text is 2%. Sizes of
particular functions change thus on -O2:
SYMBOL OLD NEW DELTA FRACTION
dwarf_formaddr 126 288 +162 2.29
dwarf_formref_die 200 407 +207 2.04
dwarf_formstring 162 365 +203 2.25
dwarf_formudata 389 569 +180 1.46
dwarf_getaranges 1144 1518 +374 1.33
dwarf_getlocation 115 118 +3 1.03
dwarf_getlocation_addr 1117 948 -169 0.85
dwarf_getpubnames 1247 1365 +118 1.09
dwarf_getsrclines 5358 5500 +142 1.03
dwarf_nextcu 453 642 +189 1.42
dwarf_ranges 694 797 +103 1.15
dwfl_module_addrsym 973 965 -8 0.99
getlocation 1585 1796 +211 1.13
I've shuffled a couple pieces of code around, and metrics got slightly
better (the table got generated from that improved code). That's now
committed. Though I'll have to restart the tests for that.
With -O3, the numbers (DELTA and FRACTION) are very similar (even though
OLD and NEW are generally larger). With -O1, DELTAs tend to be smaller.
Everything still gets inlined (or at least symbols don't show up in
symbol tables).
Does the above look acceptable, or shall I delve in and try to get rid
of always-true tests and such?
PM