* alias.c (set_mem_alias_set): New function.
* rtl.h (set_mem_alias_set): Declare it.
* builtins.c (expand_builtin_return_addr): Call it instead of
using MEM_ALIAS_SET accessor.
(expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise.
(get_memory_rtx, expand_builtin_va_arg): Likewise.
(expand_builtin_va_copy):Likewise.
* caller-save.c (setup_save_areas): Likewise.
* calls.c (compute_argument_addresses): Likewise.
* explow.c (set_mem_attributes): Likewise.
* expr.c (emit_single_push_insn, emit_push_insn): Likewise.
(expand_assignment, store_constructor_field, store_field): Likewise.
(expand_expr_unaligned): Likewise.
* function.c (assign_stack_temp_for_type): Likewise.
(put_reg_into_stack, gen_mem_addressof): Likewise.
* ifcvt.c (noce_try_cmove_arith): Likewise.
* reload1.c (reload, alter_reg): Likewise.
* config/alpha/alpha.c (get_aligned_mem): Likewise.
(alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise.
(alpha_expand_unaligned_store): Likewise
(alpha_expand_unaligned_load_words): Likewise.
(alpha_expand_unaligned_store_words): Likewise.
(alpha_expand_block_clear, alpha_expand_prologue): Likewise.
(alpha_expand_epilogue): Likewise.
* config/arc/arc.c (arc_setup_incoming_varargs): Likewise.
* config/clipper/clipper.c (clipper_builtin_saveregs): Likewise.
* config/i386/i386.c (legitimize_pic_address): Likewise.
* config/i960/i960.c (setup_incoming_varargs): Likewise.
* config/ia64/ia64.c (spill_restore_mem): Likewise.
* config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise.
* config/m8k/m88k.c (m88k_builtin_saveregs): Likewise.
* config/mips/mips.c (mips_va_arg): Likewise.
* config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise.
* config/pa/pa.c (hppa_builtin_saveregs): Likewise.
* config/rs6000/rs6000.c (rs6000_emit_move): Likewise.
(setup_incoming_varargs, rs6000_va_arg): Likewise.
(rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise.
(rs6000_emit_epilogue): Likewise.
* config/sh/sh.c (sh_builtin_saveregs): Likewise.
* config/sparc/sparc.c (sparc_va_arg): Likewise.
* config/v850/v850.c (v850_va_arg): Likewise.
From-SVN: r43951
+Wed Jul 11 10:07:18 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * alias.c (set_mem_alias_set): New function.
+ * rtl.h (set_mem_alias_set): Declare it.
+ * builtins.c (expand_builtin_return_addr): Call it instead of
+ using MEM_ALIAS_SET accessor.
+ (expand_builtin_setjmp_setup, expand_builtin_longjmp): Likewise.
+ (get_memory_rtx, expand_builtin_va_arg): Likewise.
+ (expand_builtin_va_copy):Likewise.
+ * caller-save.c (setup_save_areas): Likewise.
+ * calls.c (compute_argument_addresses): Likewise.
+ * explow.c (set_mem_attributes): Likewise.
+ * expr.c (emit_single_push_insn, emit_push_insn): Likewise.
+ (expand_assignment, store_constructor_field, store_field): Likewise.
+ (expand_expr_unaligned): Likewise.
+ * function.c (assign_stack_temp_for_type): Likewise.
+ (put_reg_into_stack, gen_mem_addressof): Likewise.
+ * ifcvt.c (noce_try_cmove_arith): Likewise.
+ * reload1.c (reload, alter_reg): Likewise.
+ * config/alpha/alpha.c (get_aligned_mem): Likewise.
+ (alpha_set_memflags_1, alpha_expand_unaligned_load): Likewise.
+ (alpha_expand_unaligned_store): Likewise
+ (alpha_expand_unaligned_load_words): Likewise.
+ (alpha_expand_unaligned_store_words): Likewise.
+ (alpha_expand_block_clear, alpha_expand_prologue): Likewise.
+ (alpha_expand_epilogue): Likewise.
+ * config/arc/arc.c (arc_setup_incoming_varargs): Likewise.
+ * config/clipper/clipper.c (clipper_builtin_saveregs): Likewise.
+ * config/i386/i386.c (legitimize_pic_address): Likewise.
+ * config/i960/i960.c (setup_incoming_varargs): Likewise.
+ * config/ia64/ia64.c (spill_restore_mem): Likewise.
+ * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise.
+ * config/m8k/m88k.c (m88k_builtin_saveregs): Likewise.
+ * config/mips/mips.c (mips_va_arg): Likewise.
+ * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise.
+ * config/pa/pa.c (hppa_builtin_saveregs): Likewise.
+ * config/rs6000/rs6000.c (rs6000_emit_move): Likewise.
+ (setup_incoming_varargs, rs6000_va_arg): Likewise.
+ (rs6000_emit_eh_toc_restore, rs6000_emit_prologue): Likewise.
+ (rs6000_emit_epilogue): Likewise.
+ * config/sh/sh.c (sh_builtin_saveregs): Likewise.
+ * config/sparc/sparc.c (sparc_va_arg): Likewise.
+ * config/v850/v850.c (v850_va_arg): Likewise.
+
Wed Jul 11 21:27:25 CEST 2001 Jan Hubicka <jh@suse.cz>
* flow.c (merge_blocks_move_successor_nojumps): Do not crash
return 0;
}
\f
+/* Set the alias set of MEM to SET. */
+
+void
+set_mem_alias_set (mem, set)
+ rtx mem;
+ HOST_WIDE_INT set;
+{
+ /* We would like to do this test but can't yet since when converting a
+ REG to a MEM, the alias set field is undefined. */
+#if 0
+ /* If the new and old alias sets don't conflict, something is wrong. */
+ if (!alias_sets_conflict_p (set, MEM_ALIAS_SET (mem)))
+ abort ();
+#endif
+
+ MEM_ALIAS_SET (mem) = set;
+}
+\f
/* Return 1 if TYPE is a RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE and has
has any readonly fields. If any of the fields have types that
contain readonly fields, return true as well. */
#endif
tem = memory_address (Pmode, tem);
tem = gen_rtx_MEM (Pmode, tem);
- MEM_ALIAS_SET (tem) = get_frame_alias_set ();
+ set_mem_alias_set (tem, get_frame_alias_set ());
tem = copy_to_reg (tem);
}
tem = memory_address (Pmode,
plus_constant (tem, GET_MODE_SIZE (Pmode)));
tem = gen_rtx_MEM (Pmode, tem);
- MEM_ALIAS_SET (tem) = get_frame_alias_set ();
+ set_mem_alias_set (tem, get_frame_alias_set ());
#endif
return tem;
}
#endif
mem = gen_rtx_MEM (Pmode, buf_addr);
- MEM_ALIAS_SET (mem) = setjmp_alias_set;
+ set_mem_alias_set (mem, setjmp_alias_set);
emit_move_insn (mem, BUILTIN_SETJMP_FRAME_VALUE);
mem = gen_rtx_MEM (Pmode, plus_constant (buf_addr, GET_MODE_SIZE (Pmode))),
- MEM_ALIAS_SET (mem) = setjmp_alias_set;
+ set_mem_alias_set (mem, setjmp_alias_set);
emit_move_insn (validize_mem (mem),
force_reg (Pmode, gen_rtx_LABEL_REF (Pmode, receiver_label)));
stack_save = gen_rtx_MEM (sa_mode,
plus_constant (buf_addr,
2 * GET_MODE_SIZE (Pmode)));
- MEM_ALIAS_SET (stack_save) = setjmp_alias_set;
+ set_mem_alias_set (stack_save, setjmp_alias_set);
emit_stack_save (SAVE_NONLOCAL, &stack_save, NULL_RTX);
/* If there is further processing to do, do it. */
stack = gen_rtx_MEM (sa_mode, plus_constant (buf_addr,
2 * GET_MODE_SIZE (Pmode)));
- MEM_ALIAS_SET (fp) = MEM_ALIAS_SET (lab) = MEM_ALIAS_SET (stack)
- = setjmp_alias_set;
+ set_mem_alias_set (fp, setjmp_alias_set);
+ set_mem_alias_set (lab, setjmp_alias_set);
+ set_mem_alias_set (stack, setjmp_alias_set);
/* Pick up FP, label, and SP from the block and jump. This code is
from expand_goto in stmt.c; see there for detailed comments. */
return mem;
set_mem_attributes (mem, exp, 0);
-
/* memcpy, memset and other builtin stringops can alias with anything. */
- MEM_ALIAS_SET (mem) = 0;
+ set_mem_alias_set (mem, 0);
return mem;
}
\f
}
result = gen_rtx_MEM (TYPE_MODE (type), addr);
- MEM_ALIAS_SET (result) = get_varargs_alias_set ();
+ set_mem_alias_set (result, get_varargs_alias_set ());
return result;
}
/* "Dereference" to BLKmode memories. */
dstb = gen_rtx_MEM (BLKmode, dstb);
- MEM_ALIAS_SET (dstb) = get_alias_set (TREE_TYPE (TREE_TYPE (dst)));
+ set_mem_alias_set (dstb, get_alias_set (TREE_TYPE (TREE_TYPE (dst))));
srcb = gen_rtx_MEM (BLKmode, srcb);
- MEM_ALIAS_SET (srcb) = get_alias_set (TREE_TYPE (TREE_TYPE (src)));
+ set_mem_alias_set (srcb, get_alias_set (TREE_TYPE (TREE_TYPE (src))));
/* Copy. */
emit_block_move (dstb, srcb, size, TYPE_ALIGN (va_list_type_node));
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
for (j = MOVE_MAX_WORDS; j > 0; j--)
if (regno_save_mem[i][j] != 0)
- MEM_ALIAS_SET (regno_save_mem[i][j]) = get_frame_alias_set ();
+ set_mem_alias_set (regno_save_mem[i][j], get_frame_alias_set ());
}
\f
/* Find the places where hard regs are live across calls and save them. */
outgoing arguments and we cannot allow reordering of reads
from function arguments with stores to outgoing arguments
of sibling calls. */
- MEM_ALIAS_SET (args[i].stack) = 0;
- MEM_ALIAS_SET (args[i].stack_slot) = 0;
+ set_mem_alias_set (args[i].stack, 0);
+ set_mem_alias_set (args[i].stack_slot, 0);
}
}
}
/* Sadly, we cannot use alias sets here because we may overlap other
data in a different alias set. */
- MEM_ALIAS_SET (*paligned_mem) = 0;
+ set_mem_alias_set (*paligned_mem, 0);
*pbitnum = GEN_INT ((offset & 3) * 8);
}
are the only thing we would be able to differentiate anyway,
there does not seem to be any point in convoluting the early
out of the alias check. */
- /* MEM_ALIAS_SET (x) = alias_set; */
break;
default:
gen_rtx_AND (DImode,
plus_constant (XEXP (mem, 0), ofs),
GEN_INT (-8)));
- MEM_ALIAS_SET (tmp) = 0;
+ set_mem_alias_set (tmp, 0);
emit_move_insn (meml, tmp);
tmp = change_address (mem, DImode,
plus_constant (XEXP (mem, 0),
ofs + size - 1),
GEN_INT (-8)));
- MEM_ALIAS_SET (tmp) = 0;
+ set_mem_alias_set (tmp, 0);
emit_move_insn (memh, tmp);
if (sign && size == 2)
gen_rtx_AND (DImode,
plus_constant (XEXP (dst, 0), ofs),
GEN_INT (-8)));
- MEM_ALIAS_SET (meml) = 0;
+ set_mem_alias_set (meml, 0);
memh = change_address (dst, DImode,
gen_rtx_AND (DImode,
plus_constant (XEXP (dst, 0),
ofs+size-1),
GEN_INT (-8)));
- MEM_ALIAS_SET (memh) = 0;
+ set_mem_alias_set (memh, 0);
emit_move_insn (dsth, memh);
emit_move_insn (dstl, meml);
gen_rtx_AND (DImode,
plus_constant (XEXP(smem,0), 8*i),
im8));
- MEM_ALIAS_SET (tmp) = 0;
+ set_mem_alias_set (tmp, 0);
emit_move_insn (data_regs[i], tmp);
}
gen_rtx_AND (DImode,
plus_constant (XEXP(smem,0), 8*words - 1),
im8));
- MEM_ALIAS_SET (tmp) = 0;
+ set_mem_alias_set (tmp, 0);
emit_move_insn (data_regs[words], tmp);
/* Extract the half-word fragments. Unfortunately DEC decided to make
plus_constant (XEXP(dmem,0),
words*8 - 1),
im8));
- MEM_ALIAS_SET (st_addr_2) = 0;
+ set_mem_alias_set (st_addr_2, 0);
st_addr_1 = change_address (dmem, DImode,
gen_rtx_AND (DImode,
XEXP (dmem, 0),
im8));
- MEM_ALIAS_SET (st_addr_1) = 0;
+ set_mem_alias_set (st_addr_1, 0);
/* Load up the destination end bits. */
emit_move_insn (st_tmp_2, st_addr_2);
gen_rtx_AND (DImode,
plus_constant(XEXP (dmem,0), i*8),
im8));
- MEM_ALIAS_SET (tmp) = 0;
+ set_mem_alias_set (tmp, 0);
emit_move_insn (tmp, data_regs ? ins_tmps[i-1] : const0_rtx);
}
emit_move_insn (st_addr_1, st_tmp_1);
HOST_WIDE_INT mask;
mem = adjust_address (orig_dst, mode, ofs - inv_alignofs);
- MEM_ALIAS_SET (mem) = 0;
+ set_mem_alias_set (mem, 0);
mask = ~(~(HOST_WIDE_INT)0 << (inv_alignofs * 8));
if (bytes < alignofs)
words = bytes / 8;
for (i = 0; i < words; ++i)
{
- rtx mem;
- mem = change_address (orig_dst, DImode,
- gen_rtx_AND (DImode,
- plus_constant (XEXP (orig_dst, 0),
- ofs + i*8),
- GEN_INT (-8)));
- MEM_ALIAS_SET (mem) = 0;
+ rtx mem
+ = change_address (orig_dst, DImode,
+ gen_rtx_AND (DImode,
+ plus_constant (XEXP (orig_dst, 0),
+ ofs + i*8),
+ GEN_INT (-8)));
+ set_mem_alias_set (mem, 0);
emit_move_insn (mem, const0_rtx);
}
HOST_WIDE_INT mask;
mem = adjust_address (orig_dst, DImode, ofs);
- MEM_ALIAS_SET (mem) = 0;
+ set_mem_alias_set (mem, 0);
mask = ~(HOST_WIDE_INT)0 << (bytes * 8);
HOST_WIDE_INT mask;
mem = adjust_address (orig_dst, SImode, ofs);
- MEM_ALIAS_SET (mem) = 0;
+ set_mem_alias_set (mem, 0);
mask = ~(HOST_WIDE_INT)0 << (bytes * 8);
if (TARGET_OPEN_VMS && vms_is_stack_procedure)
{
mem = gen_rtx_MEM (DImode, stack_pointer_rtx);
- MEM_ALIAS_SET (mem) = alpha_sr_alias_set;
+ set_mem_alias_set (mem, alpha_sr_alias_set);
FRP (emit_move_insn (mem, gen_rtx_REG (DImode, REG_PV)));
}
if (imask & (1L << REG_RA))
{
mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset));
- MEM_ALIAS_SET (mem) = alpha_sr_alias_set;
+ set_mem_alias_set (mem, alpha_sr_alias_set);
FRP (emit_move_insn (mem, gen_rtx_REG (DImode, REG_RA)));
imask &= ~(1L << REG_RA);
reg_offset += 8;
if (imask & (1L << i))
{
mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset));
- MEM_ALIAS_SET (mem) = alpha_sr_alias_set;
+ set_mem_alias_set (mem, alpha_sr_alias_set);
FRP (emit_move_insn (mem, gen_rtx_REG (DImode, i)));
reg_offset += 8;
}
if (fmask & (1L << i))
{
mem = gen_rtx_MEM (DFmode, plus_constant (sa_reg, reg_offset));
- MEM_ALIAS_SET (mem) = alpha_sr_alias_set;
+ set_mem_alias_set (mem, alpha_sr_alias_set);
FRP (emit_move_insn (mem, gen_rtx_REG (DFmode, i+32)));
reg_offset += 8;
}
mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset));
if (! eh_ofs)
- MEM_ALIAS_SET (mem) = alpha_sr_alias_set;
+ set_mem_alias_set (mem, alpha_sr_alias_set);
FRP (emit_move_insn (gen_rtx_REG (DImode, REG_RA), mem));
reg_offset += 8;
else
{
mem = gen_rtx_MEM (DImode, plus_constant(sa_reg, reg_offset));
- MEM_ALIAS_SET (mem) = alpha_sr_alias_set;
+ set_mem_alias_set (mem, alpha_sr_alias_set);
FRP (emit_move_insn (gen_rtx_REG (DImode, i), mem));
}
reg_offset += 8;
if (fmask & (1L << i))
{
mem = gen_rtx_MEM (DFmode, plus_constant(sa_reg, reg_offset));
- MEM_ALIAS_SET (mem) = alpha_sr_alias_set;
+ set_mem_alias_set (mem, alpha_sr_alias_set);
FRP (emit_move_insn (gen_rtx_REG (DFmode, i+32), mem));
reg_offset += 8;
}
{
emit_insn (gen_blockage ());
mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, fp_offset));
- MEM_ALIAS_SET (mem) = alpha_sr_alias_set;
+ set_mem_alias_set (mem, alpha_sr_alias_set);
FRP (emit_move_insn (hard_frame_pointer_rtx, mem));
}
else if (TARGET_OPEN_VMS)
/* Subroutines used for code generation on the Argonaut ARC cpu.
- Copyright (C) 1994, 1995, 1997, 1998, 1999,
- 2000 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GNU CC.
plus_constant (arg_pointer_rtx,
FIRST_PARM_OFFSET (0)
+ align_slop * UNITS_PER_WORD));
- MEM_ALIAS_SET (regblock) = get_varargs_alias_set ();
+ set_mem_alias_set (regblock, get_varargs_alias_set ());
move_block_from_reg (first_reg_offset, regblock,
MAX_ARC_PARM_REGS - first_reg_offset,
((MAX_ARC_PARM_REGS - first_reg_offset)
/* Subroutines for insn-output.c for Clipper
- Copyright (C) 1987, 1988, 1991, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1991, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Holger Teutsch (holger@hotbso.rhein-main.de)
This file is part of GNU CC.
/* Store int regs */
mem = gen_rtx_MEM (SImode, r0_addr);
- MEM_ALIAS_SET (mem) = set;
+ set_mem_alias_set (mem, set);
emit_move_insn (mem, gen_rtx_REG (SImode, 0));
mem = gen_rtx_MEM (SImode, r1_addr);
- MEM_ALIAS_SET (mem) = set;
+ set_mem_alias_set (mem, set);
emit_move_insn (mem, gen_rtx_REG (SImode, 1));
/* Store float regs */
mem = gen_rtx_MEM (DFmode, f0_addr);
- MEM_ALIAS_SET (mem) = set;
+ set_mem_alias_set (mem, set);
emit_move_insn (mem, gen_rtx_REG (DFmode, 16));
mem = gen_rtx_MEM (DFmode, f1_addr);
- MEM_ALIAS_SET (mem) = set;
+ set_mem_alias_set (mem, set);
emit_move_insn (mem, gen_rtx_REG (DFmode, 17));
if (current_function_check_memory_usage)
new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new);
new = gen_rtx_MEM (Pmode, new);
RTX_UNCHANGING_P (new) = 1;
- MEM_ALIAS_SET (new) = ix86_GOT_alias_set ();
+ set_mem_alias_set (new, ix86_GOT_alias_set ());
if (reg == 0)
reg = gen_reg_rtx (Pmode);
/* ??? Note that we unnecessarily store one extra register for stdarg
fns. We could optimize this, but it's kept as for now. */
regblock = gen_rtx_MEM (BLKmode,
- plus_constant (arg_pointer_rtx,
- first_reg * 4));
- MEM_ALIAS_SET (regblock) = get_varargs_alias_set ();
+ plus_constant (arg_pointer_rtx, first_reg * 4));
+ set_mem_alias_set (regblock, get_varargs_alias_set ());
move_block_from_reg (first_reg, regblock,
NPARM_REGS - first_reg,
(NPARM_REGS - first_reg) * UNITS_PER_WORD);
&& frame_pointer_needed)
{
mem = gen_rtx_MEM (GET_MODE (reg), hard_frame_pointer_rtx);
- MEM_ALIAS_SET (mem) = get_varargs_alias_set ();
+ set_mem_alias_set (mem, get_varargs_alias_set ());
return mem;
}
else
/* ??? Not all of the spills are for varargs, but some of them are.
The rest of the spills belong in an alias set of their own. But
it doesn't actually hurt to include them here. */
- MEM_ALIAS_SET (mem) = get_varargs_alias_set ();
+ set_mem_alias_set (mem, get_varargs_alias_set ());
spill_fill_data.prev_addr[iter] = &XEXP (mem, 0);
spill_fill_data.prev_off[iter] = cfa_off;
regblock = gen_rtx_MEM (BLKmode,
plus_constant (arg_pointer_rtx,
FIRST_PARM_OFFSET (0)));
- MEM_ALIAS_SET (regblock) = get_varargs_alias_set ();
+ set_mem_alias_set (regblock, get_varargs_alias_set ());
move_block_from_reg (first_reg_offset, regblock,
size, size * UNITS_PER_WORD);
variable_args_p = 1;
fixed = 0;
- if (CONSTANT_P (current_function_arg_offset_rtx))
- {
- fixed = (XINT (current_function_arg_offset_rtx, 0)
- + argadj) / UNITS_PER_WORD;
- }
+ if (GET_CODE (current_function_arg_offset_rtx) == CONST_INT)
+ fixed = ((INTVAL (current_function_arg_offset_rtx) + argadj)
+ / UNITS_PER_WORD);
/* Allocate the register space, and store it as the __va_reg member. */
addr = assign_stack_local (BLKmode, 8 * UNITS_PER_WORD, -1);
- MEM_ALIAS_SET (addr) = get_varargs_alias_set ();
+ set_mem_alias_set (addr, get_varargs_alias_set ());
RTX_UNCHANGING_P (addr) = 1;
RTX_UNCHANGING_P (XEXP (addr, 0)) = 1;
if (indirect)
{
r = gen_rtx_MEM (Pmode, addr_rtx);
- MEM_ALIAS_SET (r) = get_varargs_alias_set ();
+ set_mem_alias_set (r, get_varargs_alias_set ());
emit_move_insn (addr_rtx, r);
}
else
if (indirect)
{
r = gen_rtx_MEM (Pmode, addr_rtx);
- MEM_ALIAS_SET (r) = get_varargs_alias_set ();
+ set_mem_alias_set (r, get_varargs_alias_set ());
emit_move_insn (addr_rtx, r);
}
else
offset = current_function_arg_offset_rtx;
mem = gen_rtx_MEM (SImode, current_function_internal_arg_pointer);
- MEM_ALIAS_SET (mem) = set;
+ set_mem_alias_set (mem, set);
emit_move_insn (mem, gen_rtx_REG (SImode, 0));
mem = gen_rtx_MEM (SImode,
plus_constant (current_function_internal_arg_pointer, 4));
- MEM_ALIAS_SET (mem) = set;
+ set_mem_alias_set (mem, set);
emit_move_insn (mem, gen_rtx_REG (SImode, 1));
return copy_to_reg (expand_binop (Pmode, add_optab,
dest = gen_rtx_MEM (BLKmode,
plus_constant (current_function_internal_arg_pointer,
-16));
- MEM_ALIAS_SET (dest) = get_varargs_alias_set ();
+ set_mem_alias_set (dest, get_varargs_alias_set ());
move_block_from_reg (23, dest, 4, 4 * UNITS_PER_WORD);
/* move_block_from_reg will emit code to store the argument registers
get_pool_constant (XEXP (operands[1], 0)),
get_pool_mode (XEXP (operands[1], 0))))
{
- operands[1] = gen_rtx_MEM (mode,
- create_TOC_reference (XEXP (operands[1], 0)));
- MEM_ALIAS_SET (operands[1]) = get_TOC_alias_set ();
+ operands[1]
+ = gen_rtx_MEM (mode,
+ create_TOC_reference (XEXP (operands[1], 0)));
+ set_mem_alias_set (operands[1], get_TOC_alias_set ());
RTX_UNCHANGING_P (operands[1]) = 1;
}
}
mem = gen_rtx_MEM (BLKmode,
plus_constant (save_area,
first_reg_offset * reg_size)),
- MEM_ALIAS_SET (mem) = set;
+ set_mem_alias_set (mem, set);
move_block_from_reg
(GP_ARG_MIN_REG + first_reg_offset, mem,
while (fregno <= FP_ARG_V4_MAX_REG)
{
mem = gen_rtx_MEM (DFmode, plus_constant (save_area, off));
- MEM_ALIAS_SET (mem) = set;
+ set_mem_alias_set (mem, set);
emit_move_insn (mem, gen_rtx_REG (DFmode, fregno));
fregno++;
off += 8;
if (indirect_p)
{
r = gen_rtx_MEM (Pmode, addr_rtx);
- MEM_ALIAS_SET (r) = get_varargs_alias_set ();
+ set_mem_alias_set (r, get_varargs_alias_set ());
emit_move_insn (addr_rtx, r);
}
rtx loop_exit = gen_label_rtx ();
mem = gen_rtx_MEM (Pmode, hard_frame_pointer_rtx);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
emit_move_insn (bottom_of_stack, mem);
top_of_stack = expand_binop (Pmode, add_optab,
loop_exit);
mem = gen_rtx_MEM (Pmode, bottom_of_stack);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
emit_move_insn (bottom_of_stack, mem);
mem = gen_rtx_MEM (Pmode,
}
#endif /* TARGET_AIX */
\f
-/* This ties together stack memory
- (MEM with an alias set of rs6000_sr_alias_set)
- and the change to the stack pointer. */
+/* This ties together stack memory (MEM with an alias set of
+ rs6000_sr_alias_set) and the change to the stack pointer. */
+
static void
rs6000_emit_stack_tie ()
{
- rtx mem;
- mem = gen_rtx_MEM (BLKmode, gen_rtx_REG (Pmode, STACK_POINTER_REGNUM));
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+ rtx mem = gen_rtx_MEM (BLKmode, gen_rtx_REG (Pmode, STACK_POINTER_REGNUM));
+
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
emit_insn (gen_stack_tie (mem));
}
+ sp_offset
+ 8*i));
mem = gen_rtx_MEM (DFmode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
insn = emit_move_insn (mem, reg);
rs6000_frame_related (insn, frame_ptr_rtx, info->total_size,
GEN_INT (info->fp_save_offset
+ sp_offset + 8*i));
mem = gen_rtx_MEM (DFmode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
RTVEC_ELT (p, i + 2) = gen_rtx_SET (VOIDmode, mem, reg);
}
+ sp_offset
+ reg_size * i));
mem = gen_rtx_MEM (reg_mode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
RTVEC_ELT (p, i) = gen_rtx_SET (VOIDmode, mem, reg);
}
+ sp_offset
+ reg_size * i));
mem = gen_rtx_MEM (reg_mode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
insn = emit_move_insn (mem, reg);
rs6000_frame_related (insn, frame_ptr_rtx, info->total_size,
info->ehrd_offset + sp_offset
+ reg_size * (int) i);
mem = gen_rtx_MEM (reg_mode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
insn = emit_move_insn (mem, reg);
rs6000_frame_related (insn, frame_ptr_rtx, info->total_size,
rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx,
GEN_INT (info->cr_save_offset + sp_offset));
rtx mem = gen_rtx_MEM (SImode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
/* If r12 was used to hold the original sp, copy cr into r0 now
that it's free. */
rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx,
GEN_INT (info->lr_save_offset + sp_offset));
rtx mem = gen_rtx_MEM (Pmode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
emit_move_insn (gen_rtx_REG (Pmode, 0), mem);
}
rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx,
GEN_INT (info->cr_save_offset + sp_offset));
rtx mem = gen_rtx_MEM (SImode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
emit_move_insn (gen_rtx_REG (SImode, 12), mem);
}
info->ehrd_offset + sp_offset
+ reg_size * (int) i);
mem = gen_rtx_MEM (reg_mode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
emit_move_insn (gen_rtx_REG (reg_mode, regno), mem);
}
+ sp_offset
+ reg_size * i));
rtx mem = gen_rtx_MEM (reg_mode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
RTVEC_ELT (p, i) =
gen_rtx_SET (VOIDmode,
+ sp_offset
+ reg_size * i));
rtx mem = gen_rtx_MEM (reg_mode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
emit_move_insn (gen_rtx_REG (reg_mode,
info->first_gp_reg_save + i),
+ sp_offset
+ 8*i));
mem = gen_rtx_MEM (DFmode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
emit_move_insn (gen_rtx_REG (DFmode,
info->first_fp_reg_save + i),
addr = gen_rtx_PLUS (Pmode, sp_reg_rtx,
GEN_INT (info->fp_save_offset + 8*i));
mem = gen_rtx_MEM (DFmode, addr);
- MEM_ALIAS_SET (mem) = rs6000_sr_alias_set;
+ set_mem_alias_set (mem, rs6000_sr_alias_set);
RTVEC_ELT (p, i+3) =
gen_rtx_SET (VOIDmode,
/* Number of SFmode float regs to save. */
int n_floatregs = MAX (0, NPARM_REGS (SFmode) - first_floatreg);
rtx regbuf, fpregs;
- int bufsize, regno, alias_set;
+ int bufsize, regno;
+ HOST_WIDE_INT alias_set;
/* Allocate block of memory for the regs. */
/* ??? If n_intregs + n_floatregs == 0, should we allocate at least 1 byte?
regbuf = assign_stack_local (BLKmode, bufsize, 0);
alias_set = get_varargs_alias_set ();
- MEM_ALIAS_SET (regbuf) = alias_set;
+ set_mem_alias_set (regbuf, alias_set);
/* Save int args.
This is optimized to only save the regs that are necessary. Explicitly
emit_insn (gen_addsi3 (fpregs, fpregs,
GEN_INT (-2 * UNITS_PER_WORD)));
mem = gen_rtx_MEM (DFmode, fpregs);
- MEM_ALIAS_SET (mem) = alias_set;
+ set_mem_alias_set (mem, alias_set);
emit_move_insn (mem,
gen_rtx (REG, DFmode, BASE_ARG_REG (DFmode) + regno));
}
{
emit_insn (gen_addsi3 (fpregs, fpregs, GEN_INT (- UNITS_PER_WORD)));
mem = gen_rtx_MEM (SFmode, fpregs);
- MEM_ALIAS_SET (mem) = alias_set;
+ set_mem_alias_set (mem, alias_set);
emit_move_insn (mem,
gen_rtx (REG, SFmode, BASE_ARG_REG (SFmode) + regno
- (TARGET_LITTLE_ENDIAN != 0)));
for (regno = NPARM_REGS (SFmode) - 1; regno >= first_floatreg; regno--)
{
rtx mem;
+
emit_insn (gen_addsi3 (fpregs, fpregs, GEN_INT (- UNITS_PER_WORD)));
mem = gen_rtx_MEM (SFmode, fpregs);
- MEM_ALIAS_SET (mem) = alias_set;
+ set_mem_alias_set (mem, alias_set);
emit_move_insn (mem,
gen_rtx_REG (SFmode, BASE_ARG_REG (SFmode) + regno));
}
addr_rtx = force_reg (Pmode, addr_rtx);
addr_rtx = gen_rtx_MEM (BLKmode, addr_rtx);
- MEM_ALIAS_SET (addr_rtx) = get_varargs_alias_set ();
+ set_mem_alias_set (addr_rtx, get_varargs_alias_set ());
tmp = shallow_copy_rtx (tmp);
PUT_MODE (tmp, BLKmode);
- MEM_ALIAS_SET (tmp) = 0;
+ set_mem_alias_set (tmp, 0);
dest_addr = emit_block_move (tmp, addr_rtx, GEN_INT (rsize),
BITS_PER_WORD);
{
addr_rtx = force_reg (Pmode, addr_rtx);
addr_rtx = gen_rtx_MEM (Pmode, addr_rtx);
- MEM_ALIAS_SET (addr_rtx) = get_varargs_alias_set ();
+ set_mem_alias_set (addr_rtx, get_varargs_alias_set ());
}
return addr_rtx;
{
addr_rtx = force_reg (Pmode, addr_rtx);
addr_rtx = gen_rtx_MEM (Pmode, addr_rtx);
- MEM_ALIAS_SET (addr_rtx) = get_varargs_alias_set ();
+ set_mem_alias_set (addr_rtx, get_varargs_alias_set ());
}
return addr_rtx;
here, because, in C and C++, the fact that a location is accessed
through a const expression does not mean that the value there can
never change. */
- MEM_ALIAS_SET (ref) = get_alias_set (t);
+ set_mem_alias_set (ref, get_alias_set (t));
MEM_VOLATILE_P (ref) = TYPE_VOLATILE (type);
MEM_IN_STRUCT_P (ref) = AGGREGATE_TYPE_P (type);
outgoing arguments and we cannot allow reordering of reads
from function arguments with stores to outgoing arguments
of sibling calls. */
- MEM_ALIAS_SET (dest) = 0;
+ set_mem_alias_set (dest, 0);
}
emit_move_insn (dest, x);
#else
outgoing arguments and we cannot allow reordering of reads
from function arguments with stores to outgoing arguments
of sibling calls. */
- MEM_ALIAS_SET (target) = 0;
+ set_mem_alias_set (target, 0);
}
/* TEMP is the address of the block. Copy the data there. */
outgoing arguments and we cannot allow reordering of reads
from function arguments with stores to outgoing arguments
of sibling calls. */
- MEM_ALIAS_SET (dest) = 0;
+ set_mem_alias_set (dest, 0);
}
emit_move_insn (dest, x);
{
to_rtx = expand_expr (to, NULL_RTX, VOIDmode, EXPAND_MEMORY_USE_WO);
if (GET_CODE (to_rtx) == MEM)
- MEM_ALIAS_SET (to_rtx) = get_alias_set (to);
+ set_mem_alias_set (to_rtx, get_alias_set (to));
}
/* Don't move directly into a return register. */
if (bitpos != 0)
align = MIN (align, (unsigned int) bitpos & - bitpos);
if (GET_CODE (target) == MEM)
- MEM_ALIAS_SET (target) = alias_set;
+ set_mem_alias_set (target, alias_set);
store_constructor (exp, target, align, cleared, bitsize / BITS_PER_UNIT);
}
at the same location. We will give the structures alias set
zero; here we must be careful not to give non-zero alias sets
to their fields. */
- if (!rtx_varies_p (addr, /*for_alias=*/0))
- MEM_ALIAS_SET (to_rtx) = alias_set;
- else
- MEM_ALIAS_SET (to_rtx) = 0;
+ set_mem_alias_set (to_rtx,
+ rtx_varies_p (addr, /*for_alias=*/0)
+ ? 0 : alias_set);
return store_expr (exp, to_rtx, value_mode != VOIDmode);
}
/* Get a reference to just this component. */
op0 = adjust_address (op0, mode1, bitpos / BITS_PER_UNIT);
- MEM_ALIAS_SET (op0) = get_alias_set (exp);
+ set_mem_alias_set (op0, get_alias_set (exp));
/* Adjust the alignment in case the bit position is not
a multiple of the alignment of the inner object. */
/* If we know the alias set for the memory that will be used, use
it. If there's no TYPE, then we don't know anything about the
alias set for the memory. */
- if (type)
- MEM_ALIAS_SET (p->slot) = get_alias_set (type);
- else
- MEM_ALIAS_SET (p->slot) = 0;
+ set_mem_alias_set (p->slot, type ? get_alias_set (type) : 0);
/* If a type is specified, set the relevant flags. */
if (type != 0)
{
MEM_SET_IN_STRUCT_P (reg,
AGGREGATE_TYPE_P (type) || MEM_IN_STRUCT_P (new));
- MEM_ALIAS_SET (reg) = get_alias_set (type);
+ set_mem_alias_set (reg, get_alias_set (type));
}
if (used_p)
schedule_fixup_var_refs (function, reg, type, promoted_mode, ht);
PUT_MODE (reg, decl_mode);
MEM_VOLATILE_P (reg) = TREE_SIDE_EFFECTS (decl);
MEM_SET_IN_STRUCT_P (reg, AGGREGATE_TYPE_P (type));
- MEM_ALIAS_SET (reg) = get_alias_set (decl);
+ set_mem_alias_set (reg, get_alias_set (decl));
if (TREE_USED (decl) || DECL_INITIAL (decl) != 0)
fixup_var_refs (reg, GET_MODE (reg), TREE_UNSIGNED (type), 0);
else
{
/* We have no alias information about this newly created MEM. */
- MEM_ALIAS_SET (reg) = 0;
+ set_mem_alias_set (reg, 0);
fixup_var_refs (reg, GET_MODE (reg), 0, 0);
}
if (MEM_SCALAR_P (if_info->a) && MEM_SCALAR_P (if_info->b))
MEM_SCALAR_P (tmp) = 1;
if (MEM_ALIAS_SET (if_info->a) == MEM_ALIAS_SET (if_info->b))
- MEM_ALIAS_SET (tmp) = MEM_ALIAS_SET (if_info->a);
+ set_mem_alias_set (tmp, MEM_ALIAS_SET (if_info->a));
noce_emit_move_insn (if_info->x, tmp);
}
MEM_SCALAR_P (reg) = is_scalar;
/* We have no alias information about this newly created
MEM. */
- MEM_ALIAS_SET (reg) = 0;
+ set_mem_alias_set (reg, 0);
}
else if (reg_equiv_mem[i])
XEXP (reg_equiv_mem[i], 0) = addr;
RTX_UNCHANGING_P (x) = RTX_UNCHANGING_P (regno_reg_rtx[i]);
/* Nothing can alias this slot except this pseudo. */
- MEM_ALIAS_SET (x) = new_alias_set ();
+ set_mem_alias_set (x, new_alias_set ());
}
/* Reuse a stack slot if possible. */
/* All pseudos mapped to this slot can alias each other. */
if (spill_stack_slot[from_reg])
- MEM_ALIAS_SET (x) = MEM_ALIAS_SET (spill_stack_slot[from_reg]);
+ set_mem_alias_set (x, MEM_ALIAS_SET (spill_stack_slot[from_reg]));
else
- MEM_ALIAS_SET (x) = new_alias_set ();
+ set_mem_alias_set (x, new_alias_set ());
if (BYTES_BIG_ENDIAN)
{
extern void init_alias_analysis PARAMS ((void));
extern void end_alias_analysis PARAMS ((void));
extern rtx addr_side_effect_eval PARAMS ((rtx, int, int));
+extern void set_mem_alias_set PARAMS ((rtx, HOST_WIDE_INT));
/* In sibcall.c */
typedef enum {