This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch AArch64] Switch constant pools to separate rodata sections.


Hi,

	Now that PR63304 is fixed and we have an option to address
any part of the memory using adrp / add or adrp / ldr instructions
it makes sense to switch out literal pools into their own
mergeable sections by default.

This would mean that by default we could now start getting
the benefits of constant sharing across the board, potentially
improving code size. The other advantage of doing so, for the
security conscious is that this prevents intermingling of literal
pools with code.

Wilco's kindly done some performance measurements and suggests that
there is not really a performance regression in doing this.
I've looked at the code size for SPEC2k6 today at -Ofast and
in general there is a good code size improvement as expected
by sharing said constants.

Tested on aarch64-none-elf with no regressions and bootstrapped 
and regression tested in my tree for a number of days now.

Ok to commit ?

regards
Ramana

   * config/aarch64/aarch64.c (aarch64_select_rtx_section): Switch
to default section handling for non PC relative literal loads.

Attachment: default-rodata.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]