diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2010-09-29 20:06:55 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2010-09-29 20:06:55 +0000 |
commit | 2293974419a6541fb6425249f1340e96a3fb0766 (patch) | |
tree | 8cdfbb3965dc10b464f100060d3e2a0a64d4bd57 /gcc/rtlanal.c | |
parent | 0f23bc16605864cf7f41fab13a522004c3ee8c3a (diff) | |
download | gcc-2293974419a6541fb6425249f1340e96a3fb0766.tar.gz |
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
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index d34dc806009..930828ac2eb 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. |