diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 35cfd305e77..6e8f49130d4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,47 @@ +Wed Jul 11 10:07:18 2001 Richard Kenner + + * 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 * flow.c (merge_blocks_move_successor_nojumps): Do not crash diff --git a/gcc/alias.c b/gcc/alias.c index 3802e670fe1..912be4819c2 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -278,6 +278,24 @@ alias_sets_conflict_p (set1, set2) return 0; } +/* 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; +} + /* 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. */ diff --git a/gcc/builtins.c b/gcc/builtins.c index 0c847154680..219714dd7d1 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -427,7 +427,7 @@ expand_builtin_return_addr (fndecl_code, count, tem) #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); } @@ -443,7 +443,7 @@ expand_builtin_return_addr (fndecl_code, count, 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; } @@ -484,11 +484,11 @@ expand_builtin_setjmp_setup (buf_addr, receiver_label) #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))); @@ -496,7 +496,7 @@ expand_builtin_setjmp_setup (buf_addr, 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. */ @@ -685,8 +685,9 @@ expand_builtin_longjmp (buf_addr, value) 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. */ @@ -756,9 +757,8 @@ get_memory_rtx (exp) 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; } @@ -2965,7 +2965,7 @@ expand_builtin_va_arg (valist, type) } 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; } @@ -3025,9 +3025,9 @@ expand_builtin_va_copy (arglist) /* "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)); diff --git a/gcc/caller-save.c b/gcc/caller-save.c index ae888fb9809..0d36f30c31a 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -342,7 +342,7 @@ setup_save_areas () 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 ()); } /* Find the places where hard regs are live across calls and save them. */ diff --git a/gcc/calls.c b/gcc/calls.c index 36aa4b571c1..7421d340cd1 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1626,8 +1626,8 @@ compute_argument_addresses (args, argblock, num_actuals) 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); } } } diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index ec70eb10bf0..1f62d0d8e7f 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -1102,7 +1102,7 @@ get_aligned_mem (ref, paligned_mem, pbitnum) /* 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); } @@ -1229,7 +1229,6 @@ alpha_set_memflags_1 (x, in_struct_p, volatile_p, unchanging_p) 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: @@ -2519,7 +2518,7 @@ alpha_expand_unaligned_load (tgt, mem, size, ofs, sign) 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, @@ -2527,7 +2526,7 @@ alpha_expand_unaligned_load (tgt, mem, size, ofs, sign) 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) @@ -2600,14 +2599,14 @@ alpha_expand_unaligned_store (dst, src, size, ofs) 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); @@ -2705,7 +2704,7 @@ alpha_expand_unaligned_load_words (out_regs, smem, words, ofs) 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); } @@ -2713,7 +2712,7 @@ alpha_expand_unaligned_load_words (out_regs, smem, words, ofs) 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 @@ -2779,13 +2778,13 @@ alpha_expand_unaligned_store_words (data_regs, dmem, words, ofs) 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); @@ -2828,7 +2827,7 @@ alpha_expand_unaligned_store_words (data_regs, dmem, words, ofs) 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); @@ -3253,7 +3252,7 @@ alpha_expand_block_clear (operands) 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) @@ -3333,13 +3332,13 @@ alpha_expand_block_clear (operands) 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); } @@ -3398,7 +3397,7 @@ alpha_expand_block_clear (operands) 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); @@ -3414,7 +3413,7 @@ alpha_expand_block_clear (operands) 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); @@ -4741,7 +4740,7 @@ alpha_expand_prologue () 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))); } @@ -4749,7 +4748,7 @@ alpha_expand_prologue () 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; @@ -4760,7 +4759,7 @@ alpha_expand_prologue () 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; } @@ -4769,7 +4768,7 @@ alpha_expand_prologue () 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; } @@ -5104,7 +5103,7 @@ alpha_expand_epilogue () 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; @@ -5118,7 +5117,7 @@ alpha_expand_epilogue () 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; @@ -5128,7 +5127,7 @@ alpha_expand_epilogue () 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; } @@ -5186,7 +5185,7 @@ alpha_expand_epilogue () { 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) diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 7e309f892cc..0fe070be9a2 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -1,6 +1,6 @@ /* 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. @@ -797,7 +797,7 @@ arc_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl) 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) diff --git a/gcc/config/clipper/clipper.c b/gcc/config/clipper/clipper.c index 76320ff2076..1e3118e84f3 100644 --- a/gcc/config/clipper/clipper.c +++ b/gcc/config/clipper/clipper.c @@ -1,6 +1,6 @@ /* 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. @@ -402,21 +402,21 @@ clipper_builtin_saveregs () /* 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) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 585238f52a6..81cfcd72a20 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3421,7 +3421,7 @@ legitimize_pic_address (orig, reg) 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); diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c index 7cdb5aa41ff..12b1548d3d8 100644 --- a/gcc/config/i960/i960.c +++ b/gcc/config/i960/i960.c @@ -2581,9 +2581,8 @@ i960_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl) /* ??? 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); diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 394c910e9cf..9d1d5061b34 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -1702,7 +1702,7 @@ spill_restore_mem (reg, cfa_off) && 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 @@ -1751,7 +1751,7 @@ spill_restore_mem (reg, cfa_off) /* ??? 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; diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index 006e7beb127..a37ed653247 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -1400,7 +1400,7 @@ m32r_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl) 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); diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c index 63e46448bfc..9ac034919c4 100644 --- a/gcc/config/m88k/m88k.c +++ b/gcc/config/m88k/m88k.c @@ -2612,15 +2612,13 @@ m88k_builtin_saveregs () 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; diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 4436f7d15c6..dd2e3e39cd2 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -4515,7 +4515,7 @@ mips_va_arg (valist, type) 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 @@ -4656,7 +4656,7 @@ mips_va_arg (valist, type) 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 diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index decbe6d5bf4..7ea66d8a9b3 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -869,12 +869,12 @@ mn10300_builtin_saveregs () 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, diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index aec2e4294b3..c1fa4fe8aa5 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -4799,7 +4799,7 @@ hppa_builtin_saveregs () 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 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index a01bf6f7501..73aa3d505f0 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1861,9 +1861,10 @@ rs6000_emit_move (dest, source, mode) 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; } } @@ -2355,7 +2356,7 @@ setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl) 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, @@ -2387,7 +2388,7 @@ setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl) 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; @@ -2692,7 +2693,7 @@ rs6000_va_arg (valist, type) 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); } @@ -5673,7 +5674,7 @@ rs6000_emit_eh_toc_restore (stacksize) 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, @@ -5707,7 +5708,7 @@ rs6000_emit_eh_toc_restore (stacksize) 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, @@ -5723,15 +5724,15 @@ rs6000_emit_eh_toc_restore (stacksize) } #endif /* TARGET_AIX */ -/* 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)); } @@ -5972,7 +5973,7 @@ rs6000_emit_prologue () + 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, @@ -6004,7 +6005,7 @@ rs6000_emit_prologue () 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); } @@ -6030,7 +6031,7 @@ rs6000_emit_prologue () + 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); } @@ -6057,7 +6058,7 @@ rs6000_emit_prologue () + 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, @@ -6084,7 +6085,7 @@ rs6000_emit_prologue () 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, @@ -6113,7 +6114,8 @@ rs6000_emit_prologue () 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. */ @@ -6304,7 +6306,8 @@ rs6000_emit_epilogue (sibcall) 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); } @@ -6315,7 +6318,8 @@ rs6000_emit_epilogue (sibcall) 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); } @@ -6342,7 +6346,7 @@ rs6000_emit_epilogue (sibcall) 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); } @@ -6361,7 +6365,8 @@ rs6000_emit_epilogue (sibcall) + 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, @@ -6385,7 +6390,8 @@ rs6000_emit_epilogue (sibcall) + 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), @@ -6404,7 +6410,7 @@ rs6000_emit_epilogue (sibcall) + 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), @@ -6526,7 +6532,7 @@ rs6000_emit_epilogue (sibcall) 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, diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index b6885a74524..18e6379fd60 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -4224,7 +4224,8 @@ sh_builtin_saveregs () /* 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? @@ -4233,7 +4234,7 @@ sh_builtin_saveregs () 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 @@ -4264,7 +4265,7 @@ sh_builtin_saveregs () 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)); } @@ -4273,7 +4274,7 @@ sh_builtin_saveregs () { 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))); @@ -4283,9 +4284,10 @@ sh_builtin_saveregs () 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)); } diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 197242d1081..e7413ee3046 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -4929,10 +4929,10 @@ sparc_va_arg (valist, type) 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); @@ -4946,7 +4946,7 @@ sparc_va_arg (valist, type) { 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; diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index 2cbd1155d8c..e742eeb4f6c 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -2791,7 +2791,7 @@ v850_va_arg (valist, type) { 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; diff --git a/gcc/explow.c b/gcc/explow.c index cafbf2e2afa..afb51d9e655 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -661,7 +661,7 @@ set_mem_attributes (ref, t, objectp) 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); diff --git a/gcc/expr.c b/gcc/expr.c index 3786ee9849b..00219105159 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -3181,7 +3181,7 @@ emit_single_push_insn (mode, x, 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 @@ -3399,7 +3399,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, 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. */ @@ -3582,7 +3582,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, 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); @@ -3906,7 +3906,7 @@ expand_assignment (to, from, want_value, suggest_reg) { 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. */ @@ -4478,7 +4478,7 @@ store_constructor_field (target, bitsize, bitpos, 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); } @@ -5334,10 +5334,9 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, 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); } @@ -9141,7 +9140,7 @@ expand_expr_unaligned (exp, palign) /* 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. */ diff --git a/gcc/function.c b/gcc/function.c index 14c4513a3fa..c91da12a80b 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -808,10 +808,7 @@ assign_stack_temp_for_type (mode, size, keep, type) /* 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) @@ -1499,7 +1496,7 @@ put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p, { 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); @@ -2876,7 +2873,7 @@ gen_mem_addressof (reg, decl) 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); @@ -2884,7 +2881,7 @@ gen_mem_addressof (reg, decl) 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); } diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index a50400a9f05..6cb2fabcd13 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -1098,7 +1098,7 @@ noce_try_cmove_arith (if_info) 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); } diff --git a/gcc/reload1.c b/gcc/reload1.c index 21651553718..c494990e1f5 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -1157,7 +1157,7 @@ reload (first, global) 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; @@ -1988,7 +1988,7 @@ alter_reg (i, from_reg) 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. */ @@ -2022,9 +2022,9 @@ alter_reg (i, from_reg) /* 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) { diff --git a/gcc/rtl.h b/gcc/rtl.h index 64d9f202e68..121e0f000a5 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2004,6 +2004,7 @@ extern void init_alias_once PARAMS ((void)); 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 {