diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2011-07-19 17:43:15 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2011-07-19 17:43:15 +0000 |
commit | f5541398efc0174bbdc40933be77747ad2000426 (patch) | |
tree | 199413c100fd80dfb372de82470fdf80f5b55ccd /gcc/dce.c | |
parent | f12144ddd56e9be0faae4d144a1fb5af7969edfd (diff) | |
download | gcc-f5541398efc0174bbdc40933be77747ad2000426.zip gcc-f5541398efc0174bbdc40933be77747ad2000426.tar.gz gcc-f5541398efc0174bbdc40933be77747ad2000426.tar.bz2 |
rtl.texi (MEM_SIZE_KNOWN_P): Document.
gcc/
* doc/rtl.texi (MEM_SIZE_KNOWN_P): Document.
(MEM_SIZE): Change from returning an rtx to returning a HOST_WIDE_INT.
* rtl.h (MEM_SIZE_KNOWN_P): New macro.
(MEM_SIZE): Return a HOST_WIDE_INT rather than an rtx.
* emit-rtl.h (set_mem_size): Take a HOST_WIDE_INT rather than an rtx.
(clear_mem_size): Declare.
* emit-rtl.c (set_mem_size): Take a HOST_WIDE_INT rather than an rtx.
(clear_mem_size): New function.
* alias.c (ao_ref_from_mem): Adjust uses of MEM_SIZE, using
MEM_SIZE_KNOWN_P to test whether the size is known, and MEM_SIZE
to get a HOST_WIDE_INT size. Adjust calls to set_mem_size,
passing a HOST_WIDE_INT rather than an rtx. Use clear_mem_size
to clear the size.
(nonoverlapping_memrefs_p): Likewise.
* builtins.c (get_memory_rtx, expand_builtin_memcmp): Likewise.
(expand_builtin_init_trampoline): Likewise.
* calls.c (compute_argument_addresses): Likewise.
* cfgcleanup.c (merge_memattrs): Likewise.
* dce.c (find_call_stack_args): Likewise.
* dse.c (record_store, scan_insn): Likewise.
* dwarf2out.c (dw_sra_loc_expr): Likewise.
* expr.c (emit_block_move_hints): Likewise.
* function.c (assign_parm_find_stack_rtl): Likewise.
* print-rtl.c (print_rtx): Likewise.
* reload.c (find_reloads_subreg_address): Likewise.
* rtlanal.c (may_trap_p_1): Likewise.
* var-tracking.c (track_expr_p): Likewise.
* varasm.c (assemble_trampoline_template): Likewise.
* config/arm/arm.c (arm_print_operand): Likewise.
* config/h8300/h8300.c (h8sx_emit_movmd): Likewise.
* config/i386/i386.c (expand_movmem_via_rep_mov): Likewise.
(expand_setmem_via_rep_stos, expand_constant_movmem_prologue)
(expand_constant_setmem_prologue): Likewise.
* config/mips/mips.c (mips_get_unaligned_mem): Likewise.
* config/rs6000/rs6000.c (expand_block_move): Likewise.
(adjacent_mem_locations): Likewise.
* config/s390/s390.c (s390_expand_setmem): Likewise.
(s390_expand_insv): Likewise.
* config/s390/s390.md (*extzv<mode>, *extv<mode>): Likewise.
(*extendqi<mode>2_short_displ): Likewise.
* config/sh/sh.c (expand_block_move): Likewise.
* config/sh/sh.md (extv, extzv): Likewise.
From-SVN: r176476
Diffstat (limited to 'gcc/dce.c')
-rw-r--r-- | gcc/dce.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -275,11 +275,11 @@ find_call_stack_args (rtx call_insn, bool do_mark, bool fast, if (GET_CODE (XEXP (p, 0)) == USE && MEM_P (XEXP (XEXP (p, 0), 0))) { - rtx mem = XEXP (XEXP (p, 0), 0), addr, size; - HOST_WIDE_INT off = 0; - size = MEM_SIZE (mem); - if (size == NULL_RTX) + rtx mem = XEXP (XEXP (p, 0), 0), addr; + HOST_WIDE_INT off = 0, size; + if (!MEM_SIZE_KNOWN_P (mem)) return false; + size = MEM_SIZE (mem); addr = XEXP (mem, 0); if (GET_CODE (addr) == PLUS && REG_P (XEXP (addr, 0)) @@ -329,7 +329,7 @@ find_call_stack_args (rtx call_insn, bool do_mark, bool fast, return false; } min_sp_off = MIN (min_sp_off, off); - max_sp_off = MAX (max_sp_off, off + INTVAL (size)); + max_sp_off = MAX (max_sp_off, off + size); } if (min_sp_off >= max_sp_off) @@ -370,7 +370,7 @@ find_call_stack_args (rtx call_insn, bool do_mark, bool fast, set = single_set (DF_REF_INSN (defs->ref)); off += INTVAL (XEXP (SET_SRC (set), 1)); } - for (byte = off; byte < off + INTVAL (MEM_SIZE (mem)); byte++) + for (byte = off; byte < off + MEM_SIZE (mem); byte++) { if (!bitmap_set_bit (sp_bytes, byte - min_sp_off)) gcc_unreachable (); |