aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2019-12-04 15:40:41 +0000
committerWilco Dijkstra <wilco@gcc.gnu.org>2019-12-04 15:40:41 +0000
commitb3e3b9000be5f6636096d63444a2d62260f7cbec (patch)
tree805a29e1b44291cb8264c612c7fcb192b3860740 /gcc
parent09a214ac6bea2a7148e0694b6b1ab61e02485a53 (diff)
downloadgcc-b3e3b9000be5f6636096d63444a2d62260f7cbec.zip
gcc-b3e3b9000be5f6636096d63444a2d62260f7cbec.tar.gz
gcc-b3e3b9000be5f6636096d63444a2d62260f7cbec.tar.bz2
[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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/arm/arm.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3d59aea..eab3089 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
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
(thunderxt88_tunings): Use AARCH64_FUSE_ALU_BRANCH.
(thunderx_tunings): Likewise.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index a6b401b..6eb2afb 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.