From: jiwang Date: Fri, 12 Sep 2014 09:46:25 +0000 (+0000) Subject: [AArch64] Add regmove_costs for Cortex-A57 and A53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dda093af69b604a19751c936dcd014aac173d4ef;p=thirdparty%2Fgcc.git [AArch64] Add regmove_costs for Cortex-A57 and A53 2014-09-12 Wilco Dijkstra * gcc/config/aarch64/aarch64.c: (cortexa57_regmove_cost): New cost table for A57. (cortexa53_regmove_cost): New cost table for A53. Increase GP2FP/FP2GP cost to spilling from integer to FP registers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215208 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b10f285bcd71..af000040028f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-09-12 Wilco Dijkstra + + * gcc/config/aarch64/aarch64.c (cortexa57_regmove_cost): New cost table + for A57. + (cortexa53_regmove_cost): New cost table for A53. Increase GP2FP/FP2GP + cost to spilling from integer to FP registers. + 2014-09-12 Wilco Dijkstra * config/aarch64/aarch64.c (aarch64_register_move_cost): Fix Q register diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 73ddb0db98b2..15c7be697d35 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -218,6 +218,26 @@ static const struct cpu_regmove_cost generic_regmove_cost = NAMED_PARAM (FP2FP, 2) }; +static const struct cpu_regmove_cost cortexa57_regmove_cost = +{ + NAMED_PARAM (GP2GP, 1), + /* Avoid the use of slow int<->fp moves for spilling by setting + their cost higher than memmov_cost. */ + NAMED_PARAM (GP2FP, 5), + NAMED_PARAM (FP2GP, 5), + NAMED_PARAM (FP2FP, 2) +}; + +static const struct cpu_regmove_cost cortexa53_regmove_cost = +{ + NAMED_PARAM (GP2GP, 1), + /* Avoid the use of slow int<->fp moves for spilling by setting + their cost higher than memmov_cost. */ + NAMED_PARAM (GP2FP, 5), + NAMED_PARAM (FP2GP, 5), + NAMED_PARAM (FP2FP, 2) +}; + /* Generic costs for vector insn classes. */ #if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007 __extension__ @@ -275,7 +295,7 @@ static const struct tune_params cortexa53_tunings = { &cortexa53_extra_costs, &generic_addrcost_table, - &generic_regmove_cost, + &cortexa53_regmove_cost, &generic_vector_cost, NAMED_PARAM (memmov_cost, 4), NAMED_PARAM (issue_rate, 2) @@ -285,7 +305,7 @@ static const struct tune_params cortexa57_tunings = { &cortexa57_extra_costs, &cortexa57_addrcost_table, - &generic_regmove_cost, + &cortexa57_regmove_cost, &cortexa57_vector_cost, NAMED_PARAM (memmov_cost, 4), NAMED_PARAM (issue_rate, 3)