From: Wilco Dijkstra Date: Wed, 4 Dec 2019 15:40:41 +0000 (+0000) Subject: [ARM] Improve max_cond_insns setting for Cortex cores X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3e3b9000be5f6636096d63444a2d62260f7cbec;p=gcc.git [ARM] Improve max_cond_insns setting for Cortex cores To enable cores to use the correct max_cond_insns setting, use the core-specific tuning when a CPU/tune is selected unless -mrestrict-it is explicitly set. On Cortex-A57 this gives 1.1% performance gain on SPECINT2006 as well as a 0.4% codesize reduction. gcc/ * config/arm/arm.c (arm_option_override_internal): Use max_cond_insns from CPU tuning unless -mrestrict-it is used. From-SVN: r278968 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3d59aeab210..eab3089c486 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-12-04 Wilco Dijkstra + + * config/arm/arm.c (arm_option_override_internal): + Use max_cond_insns from CPU tuning unless -mrestrict-it is used. + 2019-12-04 Wilco Dijkstra * config/aarch64/aarch64.c diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index a6b401b7f2e..6eb2afbd85f 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3044,6 +3044,11 @@ arm_option_override_internal (struct gcc_options *opts, if (!TARGET_THUMB2_P (opts->x_target_flags) || !arm_arch_notm) opts->x_arm_restrict_it = 0; + /* Use the IT size from CPU specific tuning unless -mrestrict-it is used. */ + if (!opts_set->x_arm_restrict_it + && (opts_set->x_arm_cpu_string || opts_set->x_arm_tune_string)) + opts->x_arm_restrict_it = 0; + /* Enable -munaligned-access by default for - all ARMv6 architecture-based processors when compiling for a 32-bit ISA i.e. Thumb2 and ARM state only.