diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2019-10-11 14:23:28 +0000 |
---|---|---|
committer | Wilco Dijkstra <wilco@gcc.gnu.org> | 2019-10-11 14:23:28 +0000 |
commit | 3635c2bf7c40a959ebd257d4724ebf487155a343 (patch) | |
tree | b30bede846a1de6079e2879a544db9c58525d945 /gcc | |
parent | bd01f4da3ecc88b25712e2d2a8f5c7ab3ed1b0e3 (diff) | |
download | gcc-3635c2bf7c40a959ebd257d4724ebf487155a343.zip gcc-3635c2bf7c40a959ebd257d4724ebf487155a343.tar.gz gcc-3635c2bf7c40a959ebd257d4724ebf487155a343.tar.bz2 |
[ARM] Tweak HONOR_REG_ALLOC_ORDER
Setting HONOR_REG_ALLOC_ORDER improves codesize with -Os, however it generates
slower and larger code with -O2 and higher. So only set it when optimizing for
size. On Cortex-A57 this improves SPECINT2006 by 0.15% and SPECFP2006 by 0.25%
while reducing codesize.
gcc/
* config/arm/arm.h (HONOR_REG_ALLOC_ORDER): Set when optimizing for
size.
From-SVN: r276887
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/arm/arm.h | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a86675..8118e14 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-11 Wilco Dijkstra <wdijkstr@arm.com> + + * config/arm/arm.h (HONOR_REG_ALLOC_ORDER): Set when optimizing for + size. + 2019-10-11 Bernd Edlinger <bernd.edlinger@hotmail.de> * tree-vect-loop.c (vect_analyze_loop_operations): Adjust call to diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 8b67c9c..5fad1e5 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -1068,9 +1068,8 @@ extern int arm_regs_in_sequence[]; /* Use different register alloc ordering for Thumb. */ #define ADJUST_REG_ALLOC_ORDER arm_order_regs_for_local_alloc () -/* Tell IRA to use the order we define rather than messing it up with its - own cost calculations. */ -#define HONOR_REG_ALLOC_ORDER 1 +/* Tell IRA to use the order we define when optimizing for size. */ +#define HONOR_REG_ALLOC_ORDER optimize_function_for_size_p (cfun) /* Interrupt functions can only use registers that have already been saved by the prologue, even if they would normally be |