From 2293974419a6541fb6425249f1340e96a3fb0766 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Wed, 29 Sep 2010 20:06:55 +0000 Subject: re PR target/40457 (use stm and ldm to access consecutive memory words) PR target/40457 * postreload.c (move2add_use_add2_insn): Use full_costs for comparison. (move2add_use_add3_insn): Likewise. (reload_cse_move2add): Likewise. * rtlanal.c (get_full_rtx_cost): New function. * rtl.h (struct full_rtx_costs): New. (init_costs_to_max, init_costs_to_zero, costs_lt_p, costs_add_n_insns): New inline functions. (get_full_rtx_cost): Declare. testsuite/ PR target/40457 * gcc.target/arm/pr40457-3.c: New test. From-SVN: r164732 --- gcc/rtlanal.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gcc/rtlanal.c') diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index d34dc80..930828a 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -3589,6 +3589,17 @@ rtx_cost (rtx x, enum rtx_code outer_code ATTRIBUTE_UNUSED, bool speed) return total; } + +/* Fill in the structure C with information about both speed and size rtx + costs for X, with outer code OUTER. */ + +void +get_full_rtx_cost (rtx x, enum rtx_code outer, struct full_rtx_costs *c) +{ + c->speed = rtx_cost (x, outer, true); + c->size = rtx_cost (x, outer, false); +} + /* Return cost of address expression X. Expect that X is properly formed address reference. -- cgit v1.1