diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2016-11-15 18:18:08 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2016-11-15 18:18:08 +0000 |
commit | 7eb874201e7dccfe9e9afe9a51011a84b4527f29 (patch) | |
tree | 0f2318e61053ad855bffc49f665bbaa25530e5e6 | |
parent | 231314e360037e711922ece00817f8c2abc7aec0 (diff) | |
download | gcc-7eb874201e7dccfe9e9afe9a51011a84b4527f29.zip gcc-7eb874201e7dccfe9e9afe9a51011a84b4527f29.tar.gz gcc-7eb874201e7dccfe9e9afe9a51011a84b4527f29.tar.bz2 |
Use MEM_SIZE rather than GET_MODE_SIZE in dce.c
Using MEM_SIZE is more general, since it copes with cases where
targets are forced to use BLKmode references for whatever reason.
gcc/
2016-11-15 Richard Sandiford <richard.sandiford@arm.com>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* dce.c (check_argument_store): Pass the size instead of
the memory reference.
(find_call_stack_args): Pass MEM_SIZE to check_argument_store.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r242446
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/dce.c | 13 |
2 files changed, 15 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5e3e8a1..bd61f70 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,6 +2,14 @@ Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> + * dce.c (check_argument_store): Pass the size instead of + the memory reference. + (find_call_stack_args): Pass MEM_SIZE to check_argument_store. + +2016-11-15 Richard Sandiford <richard.sandiford@arm.com> + Alan Hayward <alan.hayward@arm.com> + David Sherwood <david.sherwood@arm.com> + * alias.c (canon_rtx): Use simplify_gen_binary. 2016-11-15 Richard Sandiford <richard.sandiford@arm.com> @@ -234,16 +234,17 @@ mark_nonreg_stores (rtx body, rtx_insn *insn, bool fast) } -/* Return true if store to MEM, starting OFF bytes from stack pointer, +/* Return true if a store to SIZE bytes, starting OFF bytes from stack pointer, is a call argument store, and clear corresponding bits from SP_BYTES bitmap if it is. */ static bool -check_argument_store (rtx mem, HOST_WIDE_INT off, HOST_WIDE_INT min_sp_off, - HOST_WIDE_INT max_sp_off, bitmap sp_bytes) +check_argument_store (HOST_WIDE_INT size, HOST_WIDE_INT off, + HOST_WIDE_INT min_sp_off, HOST_WIDE_INT max_sp_off, + bitmap sp_bytes) { HOST_WIDE_INT byte; - for (byte = off; byte < off + GET_MODE_SIZE (GET_MODE (mem)); byte++) + for (byte = off; byte < off + size; byte++) { if (byte < min_sp_off || byte >= max_sp_off @@ -468,8 +469,8 @@ find_call_stack_args (rtx_call_insn *call_insn, bool do_mark, bool fast, break; } - if (GET_MODE_SIZE (GET_MODE (mem)) == 0 - || !check_argument_store (mem, off, min_sp_off, + if (!MEM_SIZE_KNOWN_P (mem) + || !check_argument_store (MEM_SIZE (mem), off, min_sp_off, max_sp_off, sp_bytes)) break; |