diff mbox series

[AArch64] Turn on -fasynchronous-unwind-tables and -funwind-tables by default.

Message ID 7b28c03a-c032-6cec-c127-1c12cbe98eeb@foss.arm.com
State New
Headers show
Series [AArch64] Turn on -fasynchronous-unwind-tables and -funwind-tables by default. | expand

Commit Message

Ramana Radhakrishnan March 13, 2018, 1:35 p.m. UTC
Jakub commented here that
https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01325.html we don't turn
on fasynchronous-unwind-tables for AArch64. I note that x86_64 turns on
funwind-tables as well. Thus this patch turns on both.

Note that this doesn't increase code size but will likely increase
binary size because we now have a lot more eh_frame / debug_frame
information being spat out. We probably need to do get the clang /llvm
guys to do the same but I'll prod them separately.

Bootstrapped and regression tested on aarch64-none-linux-gnu.

Ok ?

regards
Ramana


config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES

common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
Turn on fasynchronous-unwind-tables and funwind-tables.
commit ef1b5fa855a369b9996ccd7041255ff75a4b5b63
Author: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Date:   Mon Mar 5 17:13:58 2018 +0000

    Add unwind tables by default for AArch64
    
    asynctables

Comments

James Greenhalgh March 19, 2018, 12:12 p.m. UTC | #1
On Tue, Mar 13, 2018 at 01:35:56PM +0000, Ramana Radhakrishnan wrote:
> Jakub commented here that
> https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01325.html we don't turn
> on fasynchronous-unwind-tables for AArch64. I note that x86_64 turns on
> funwind-tables as well. Thus this patch turns on both.
> 
> Note that this doesn't increase code size but will likely increase
> binary size because we now have a lot more eh_frame / debug_frame
> information being spat out. We probably need to do get the clang /llvm
> guys to do the same but I'll prod them separately.
> 
> Bootstrapped and regression tested on aarch64-none-linux-gnu.
> 
> Ok ?

OK.

Thanks,
James
Ramana Radhakrishnan March 27, 2018, 9:26 a.m. UTC | #2
On Mon, Mar 19, 2018 at 12:12 PM, James Greenhalgh
<james.greenhalgh@arm.com> wrote:
> On Tue, Mar 13, 2018 at 01:35:56PM +0000, Ramana Radhakrishnan wrote:
>> Jakub commented here that
>> https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01325.html we don't turn
>> on fasynchronous-unwind-tables for AArch64. I note that x86_64 turns on
>> funwind-tables as well. Thus this patch turns on both.
>>
>> Note that this doesn't increase code size but will likely increase
>> binary size because we now have a lot more eh_frame / debug_frame
>> information being spat out. We probably need to do get the clang /llvm
>> guys to do the same but I'll prod them separately.
>>
>> Bootstrapped and regression tested on aarch64-none-linux-gnu.
>>
>> Ok ?
>
> OK.
>

Now applied. Maybe the FreeBSD guys want to do the same but that's
their choice ?

CC'ing Andreas just in case he has an opinion.

Ramana

> Thanks,
> James
>
diff mbox series

Patch

diff --git a/gcc/common/config/aarch64/aarch64-common.c b/gcc/common/config/aarch64/aarch64-common.c
index 7fd9305..a9fc5f1 100644
--- a/gcc/common/config/aarch64/aarch64-common.c
+++ b/gcc/common/config/aarch64/aarch64-common.c
@@ -53,6 +53,10 @@  static const struct default_options aarch_option_optimization_table[] =
     { OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 },
     /* Enable redundant extension instructions removal at -O2 and higher.  */
     { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 },
+#if (TARGET_DEFAULT_ASYNC_UNWIND_TABLES == 1)
+    { OPT_LEVELS_ALL, OPT_fasynchronous_unwind_tables, NULL, 1 },
+    { OPT_LEVELS_ALL, OPT_funwind_tables, NULL, 1},
+#endif
     { OPT_LEVELS_NONE, 0, NULL, 0 }
   };
 
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 2156c6b..3fe7c8f 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -981,6 +981,7 @@  aarch64*-*-linux*)
 	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
 	tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
 	tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
+	tm_defines="${tm_defines}  TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
 	case $target in
 	aarch64_be-*)
 		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"