Hi Momchil,
Thanks for looking into this!
Looking at the binaries (attached) text size has increased ...
$ size 456.hmmer-before.elf text data bss dec hex filename 104960 3221 81752 189933 2e5ed ./456.hmmer-before.elf $ size 456.hmmer-after.elf text data bss dec hex filename 113912 3221 81752 198885 308e5 ./456.hmmer-after.elf
... due to .eh_frame_hdr and .eh_frame sections:
[Nr] Name Type Address Off Size ES Flg Lk Inf Al BEFORE: [12] .eh_frame_hdr PROGBITS 0000000000204848 004848 0004cc 00 A 0 0 4 [13] .eh_frame PROGBITS 0000000000204d18 004d18 0015bc 00 A 0 0 8 AFTER: [12] .eh_frame_hdr PROGBITS 0000000000204848 004848 0004cc 00 A 0 0 4 [13] .eh_frame PROGBITS 0000000000204d18 004d18 0015bc 00 A 0 0 8
.
This problem seems to be occurring only at -Oz -flto, and it is the outlined functions most affected. CC’ing Yvan (who worked on outliner recently) who may have some insight into inner workings of outliner, LTO and unwind info.
Regards,
-- Maxim Kuvyrkov https://www.linaro.org
On 28 Mar 2022, at 19:46, Momchil Velikov Momchil.Velikov@arm.com wrote:
Your patch seems to significantly increase code-size of several benchmarks — by up to 9%. Would you please investigate whether this can be avoided?
Could you, please, confirm if the size increase is due to having bigger `.eh_frame`/`.debug_frame` sections?
It looks like the reason is generating a bunch of non-sensical unwind info entries for outlined functions, e.g.:
000000bc 0000000000000010 000000c0 FDE cie=00000000 pc=0000000000000c34..0000000000000c3c DW_CFA_nop DW_CFA_nop DW_CFA_nop
I'm working on a patch to not emit .cfi_startproc/.cfi_endproc if a function does not contain any CFI instructions.
~chill IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.