From c274446abce41cc846bf6727f9be253ff9827a82 Mon Sep 17 00:00:00 2001
From: Charles Baylis <charles.baylis@linaro.org>
Date: Wed, 4 Nov 2015 17:34:05 +0000
Subject: [PATCH] Simple patch
Change-Id: I4dc5d4370ea9c5386e2bcae651ecf3fc6c21527e
---
gcc/config/arm/arm.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
@@ -9522,29 +9522,21 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
return false;
case MEM:
- /* A memory access costs 1 insn if the mode is small, or the address is
- a single register, otherwise it costs one insn per word. */
- if (REG_P (XEXP (x, 0)))
- *cost = COSTS_N_INSNS (1);
- else if (flag_pic
+ if (flag_pic
&& GET_CODE (XEXP (x, 0)) == PLUS
&& will_be_in_index_register (XEXP (XEXP (x, 0), 1)))
/* This will be split into two instructions.
See arm.md:calculate_pic_address. */
*cost = COSTS_N_INSNS (2);
else
- *cost = COSTS_N_INSNS (ARM_NUM_REGS (mode));
+ *cost = COSTS_N_INSNS (1);
/* For speed optimizations, add the costs of the address and
accessing memory. */
if (speed_p)
-#ifdef NOT_YET
*cost += (extra_cost->ldst.load
+ arm_address_cost (XEXP (x, 0), mode,
ADDR_SPACE_GENERIC, speed_p));
-#else
- *cost += extra_cost->ldst.load;
-#endif
return true;
case PARALLEL:
--
1.9.1