]> gcc.gnu.org Git - gcc.git/commitdiff
[ARM] Improve max_cond_insns setting for Cortex cores
authorWilco Dijkstra <wdijkstr@arm.com>
Wed, 4 Dec 2019 15:40:41 +0000 (15:40 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Wed, 4 Dec 2019 15:40:41 +0000 (15:40 +0000)
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

gcc/ChangeLog
gcc/config/arm/arm.c

index 3d59aeab21018cea7128dd5c2e2c67063e02f45c..eab3089c486b2060c6902e1f32e483cfcc5e79e1 100644 (file)
@@ -1,3 +1,8 @@
+2019-12-04  Wilco Dijkstra  <wdijkstr@arm.com>
+
+       * 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  <wdijkstr@arm.com>
 
        * config/aarch64/aarch64.c
index a6b401b7f2e3738ff68316bd83d6e5a2bcf0e7d7..6eb2afbd85f61cf99c225041ac1a99947a9e2550 100644 (file)
@@ -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.
This page took 0.114033 seconds and 5 git commands to generate.