From ac5e8d2fa0c3a44a0576e11b758fbecc9a1a2f99 Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Thu, 13 Feb 2020 12:32:05 +0200 Subject: [PATCH] arc: Don't use if-conversion when optimizing for size. For ARC, predicated instructions are not very friendly with size optimizations, leading to increased object size. Disable if-conversion step when optimized for size. gcc/ xxxx-xx-xx Claudiu Zissulescu * common/config/arc/arc-common.c (arc_option_optimization_table): Disable if-conversion step when optimized for size. Signed-off-by: Claudiu Zissulescu --- gcc/ChangeLog | 5 +++++ gcc/common/config/arc/arc-common.c | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dc5e403637b..41498390c21 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-02-13 Claudiu Zissulescu + + * common/config/arc/arc-common.c (arc_option_optimization_table): + Disable if-conversion step when optimized for size. + 2020-02-13 Claudiu Zissulescu * config/arc/arc.c (arc_conditional_register_usage): R0-R3 and diff --git a/gcc/common/config/arc/arc-common.c b/gcc/common/config/arc/arc-common.c index 082aa09283d..14c20123c70 100644 --- a/gcc/common/config/arc/arc-common.c +++ b/gcc/common/config/arc/arc-common.c @@ -59,6 +59,7 @@ static const struct default_options arc_option_optimization_table[] = { OPT_LEVELS_SIZE, OPT_mcase_vector_pcrel, NULL, 1 }, { OPT_LEVELS_SIZE, OPT_msize_level_, NULL, 3 }, { OPT_LEVELS_SIZE, OPT_mmillicode, NULL, 1 }, + { OPT_LEVELS_SIZE, OPT_fif_conversion, NULL, 0 }, { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 }, { OPT_LEVELS_3_PLUS_SPEED_ONLY, OPT_msize_level_, NULL, 0 }, { OPT_LEVELS_3_PLUS_SPEED_ONLY, OPT_malign_call, NULL, 1 }, -- 2.30.2