From: Saurabh Jha <[email protected]>
Currently, our register move costs are such that they are leading to
spills of long lived variables on to the stack. Moreover, it is also
leading to stack allocation for code paths where stack is not touched.
This patch decreases the register move costs like this:
* gp2gp: 3 -> 1.
* gp2fp: 5 -> 3.
* fp2gp: 4 -> 2.
* fp2fp: 4 -> 2.
These changes lead to long lived variables being kept in registers and
avoidance of stack allocation over paths which don't use stack, i.e.
shrink wrapping.
This change led to around 5% improvement in the execution time of SPEC
2017 511.povray_r benchmark against current master while using the
compiler options '-Ofast -mcpu=neoversev-v3' on Neoverse V3 core.
gcc/ChangeLog:
* config/aarch64/tuning_models/neoversev3.h: Decrease register
move costs by using generic_armv9_a_regmove_cost.
---
gcc/config/aarch64/tuning_models/neoversev3.h | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/gcc/config/aarch64/tuning_models/neoversev3.h
b/gcc/config/aarch64/tuning_models/neoversev3.h
index cafbb9e5c7cdb..0b1b6b80a7f46 100644
--- a/gcc/config/aarch64/tuning_models/neoversev3.h
+++ b/gcc/config/aarch64/tuning_models/neoversev3.h
@@ -22,16 +22,6 @@
#include "generic.h"
-static const struct cpu_regmove_cost neoversev3_regmove_cost =
-{
- 3, /* GP2GP */
- /* Spilling to int<->fp instead of memory is recommended so set
- realistic costs compared to memmov_cost. */
- 5, /* GP2FP */
- 4, /* FP2GP */
- 4 /* FP2FP */
-};
-
static const advsimd_vec_cost neoversev3_advsimd_vector_cost =
{
2, /* int_stmt_cost */
@@ -194,7 +184,7 @@ static const struct tune_params neoversev3_tunings =
{
&cortexa76_extra_costs,
&generic_armv9_a_addrcost_table,
- &neoversev3_regmove_cost,
+ &generic_armv9_a_regmove_cost,
&neoversev3_vector_cost,
&generic_branch_cost,
&generic_approx_modes,
--
2.56.0