From: Wilco Dijkstra Date: Fri, 12 Sep 2014 09:39:42 +0000 (+0000) Subject: [AArch64] Add cost handling of CALLER_SAVE_REGS and POINTER_REGS X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3be0766211a509edfca09bb402706094c22e0921;p=gcc.git [AArch64] Add cost handling of CALLER_SAVE_REGS and POINTER_REGS 2014-09-12 Wilco Dijkstra * gcc/config/aarch64/aarch64.c (aarch64_register_move_cost): Add cost handling of CALLER_SAVE_REGS and POINTER_REGS. From-SVN: r215206 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4d43c393d30..37202e8c87c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-09-12 Wilco Dijkstra + + * config/aarch64/aarch64.c (aarch64_register_move_cost): Add cost + handling of CALLER_SAVE_REGS and POINTER_REGS. + 2014-09-12 Wilco Dijkstra * gcc/ree.c (combine_reaching_defs): Ensure inserted copy don't change diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 6bb10db8a94..6f21fd9239b 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -5932,6 +5932,13 @@ aarch64_register_move_cost (enum machine_mode mode, const struct cpu_regmove_cost *regmove_cost = aarch64_tune_params->regmove_cost; + /* Caller save and pointer regs are equivalent to GENERAL_REGS. */ + if (to == CALLER_SAVE_REGS || to == POINTER_REGS) + to = GENERAL_REGS; + + if (from == CALLER_SAVE_REGS || from == POINTER_REGS) + from = GENERAL_REGS; + /* Moving between GPR and stack cost is the same as GP2GP. */ if ((from == GENERAL_REGS && to == STACK_REG) || (to == GENERAL_REGS && from == STACK_REG))