aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2011-07-19 17:43:15 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2011-07-19 17:43:15 +0000
commitf5541398efc0174bbdc40933be77747ad2000426 (patch)
tree199413c100fd80dfb372de82470fdf80f5b55ccd /gcc/alias.c
parentf12144ddd56e9be0faae4d144a1fb5af7969edfd (diff)
downloadgcc-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/alias.c')
-rw-r--r--gcc/alias.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index b32e6b3..1d74e34 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -313,10 +313,10 @@ ao_ref_from_mem (ao_ref *ref, const_rtx mem)
ref->ref_alias_set = MEM_ALIAS_SET (mem);
- /* If MEM_OFFSET or MEM_SIZE are NULL we have to punt.
+ /* If MEM_OFFSET or MEM_SIZE are unknown we have to punt.
Keep points-to related information though. */
if (!MEM_OFFSET (mem)
- || !MEM_SIZE (mem))
+ || !MEM_SIZE_KNOWN_P (mem))
{
ref->ref = NULL_TREE;
ref->offset = 0;
@@ -329,12 +329,12 @@ ao_ref_from_mem (ao_ref *ref, const_rtx mem)
case of promoted subregs on bigendian targets. Trust the MEM_EXPR
here. */
if (INTVAL (MEM_OFFSET (mem)) < 0
- && ((INTVAL (MEM_SIZE (mem)) + INTVAL (MEM_OFFSET (mem)))
+ && ((MEM_SIZE (mem) + INTVAL (MEM_OFFSET (mem)))
* BITS_PER_UNIT) == ref->size)
return true;
ref->offset += INTVAL (MEM_OFFSET (mem)) * BITS_PER_UNIT;
- ref->size = INTVAL (MEM_SIZE (mem)) * BITS_PER_UNIT;
+ ref->size = MEM_SIZE (mem) * BITS_PER_UNIT;
/* The MEM may extend into adjacent fields, so adjust max_size if
necessary. */
@@ -2338,11 +2338,11 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y, bool loop_invariant)
return 0;
sizex = (!MEM_P (rtlx) ? (int) GET_MODE_SIZE (GET_MODE (rtlx))
- : MEM_SIZE (rtlx) ? INTVAL (MEM_SIZE (rtlx))
+ : MEM_SIZE_KNOWN_P (rtlx) ? MEM_SIZE (rtlx)
: -1);
sizey = (!MEM_P (rtly) ? (int) GET_MODE_SIZE (GET_MODE (rtly))
- : MEM_SIZE (rtly) ? INTVAL (MEM_SIZE (rtly)) :
- -1);
+ : MEM_SIZE_KNOWN_P (rtly) ? MEM_SIZE (rtly)
+ : -1);
/* If we have an offset for either memref, it can update the values computed
above. */
@@ -2354,10 +2354,10 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y, bool loop_invariant)
/* If a memref has both a size and an offset, we can use the smaller size.
We can't do this if the offset isn't known because we must view this
memref as being anywhere inside the DECL's MEM. */
- if (MEM_SIZE (x) && moffsetx)
- sizex = INTVAL (MEM_SIZE (x));
- if (MEM_SIZE (y) && moffsety)
- sizey = INTVAL (MEM_SIZE (y));
+ if (MEM_SIZE_KNOWN_P (x) && moffsetx)
+ sizex = MEM_SIZE (x);
+ if (MEM_SIZE_KNOWN_P (y) && moffsety)
+ sizey = MEM_SIZE (y);
/* Put the values of the memref with the lower offset in X's values. */
if (offsetx > offsety)