[Patch AArch64] Switch constant pools to separate rodata sections.
authorRamana Radhakrishnan <ramana@gcc.gnu.org>
Thu, 5 Nov 2015 09:48:53 +0000 (09:48 +0000)
committerRamana Radhakrishnan <ramana@gcc.gnu.org>
Thu, 5 Nov 2015 09:48:53 +0000 (09:48 +0000)
        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.

2015-11-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

        * config/aarch64/aarch64.c
        (aarch64_can_use_per_function_literal_pools_p): New.
        (aarch64_use_blocks_for_constant_p): Adjust declaration
        and use aarch64_can_use_function_literal_pools_p.
        (aarch64_select_rtx_section): Update.

From-SVN: r229795

gcc/ChangeLog

index 2e58c51..60ad78a 100644 (file)
@@ -1,3 +1,11 @@
+2015-11-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+
+        * config/aarch64/aarch64.c
+        (aarch64_can_use_per_function_literal_pools_p): New.
+        (aarch64_use_blocks_for_constant_p): Adjust declaration
+        and use aarch64_can_use_function_literal_pools_p.
+        (aarch64_select_rtx_section): Update.
+
 2015-11-05  Ilya Enkovich  <enkovich.gnu@gmail.com>
 
        * targhooks.c (default_get_mask_mode): Use BLKmode in