summaryrefslogtreecommitdiffstats
path: root/gcc/expr.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-01-19 10:32:33 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-01-19 10:32:33 +0000
commit6a0934ddfa87bf698e65735cbf9ccd1417959b4c (patch)
tree328681183508c4b77ec5e404cc6511cbcea7a38f /gcc/expr.c
parentd918c5c0c08e990ab5f3841c7ac3cc9d6b7c6175 (diff)
downloadppe42-gcc-6a0934ddfa87bf698e65735cbf9ccd1417959b4c.tar.gz
ppe42-gcc-6a0934ddfa87bf698e65735cbf9ccd1417959b4c.zip
* rtl.h (rtx_def): Update documentation.
(MEM_IN_STRUCT_P): Likewise. (MEM_SCALAR_P): New macro. (MEM_COPY_ATTRIBUTES): Likewise. (MEM_SET_IN_STRUCT_P): Likewise. * rtl.texi (MEM_SCALAR_P): Document. * alias.c (canon_rtx): Use MEM_COPY_ATTRIBUTES. (fixed_scalar_and_varying_struct_p): New function. Use MEM_SCALAR_P rather than !MEM_IN_STRUCT_P. (aliases_everything_p): Likewise. (true_dependence): Use them. (write_dependence_p): New function, containing code common to anti_dependence and output_dependence. (anti_dependence): Use it. (output_dependence): Likewise. * calls.c (save_fixed_argument_area): Don't clear MEM_IN_STRUCT_P. (expand_call): Use MEM_SET_IN_STRUCT_P. (emit_library_call): Don't clear MEM_IN_STRUCT_P. (emit_library_call_value): Likewise. (store_one_arg): Use MEM_SET_IN_STRUCT_P. * combine.c (simplify_rtx): Use MEM_COPY_ATTRIBUTES. (make_extraction): Likewise. (simplify_shift_const): Likewise. (gen_lowpart_for_combine): Likewise. * cse.c (gen_lowpart_if_possible): Use MEM_COPY_ATTRIBUTES. * emit-rtl.c (operand_subword): Likewise. (change_address): Likewise. * explow.c (stabilize): Use MEM_COPY_ATTRIBUTES. * expr.c (protect_from_queue): Use MEM_COPY_ATTRIBUTES. (emit_group_store): Use MEM_SET_IN_STRUCT_P. (copy_blkmode_from_reg): Likewise. (store_field): Likewise. (expand_expr): Remove bogus guesswork setting MEM_IN_STRUCT_P heuristically. Use MEM_SET_IN_STRUCT_P. (get_memory_rtx): Likewise. * final.c (alter_subreg): Use MEM_COPY_ATTRIBUTES. * function.c (assign_stack_temp): Clear MEM_SCALAR_P and MEM_ALIAS_SET on newly returned MEMs. (assign_temp): Use MEM_SET_IN_STRUCT_P. (put_reg_into_stack): Likewise. (fixup_var_refs1): Use MEM_COPY_ATTRIBUTES. (gen_mem_addressof): Use MEM_SET_IN_STRUCT_P. (assign_parms): Likewise. (expand_function): Likewise. * integrate.c (expand_inline_function): Likewise. (copy_rtx_and_substitute): Use MEM_COPY_ATTRIBUTES. * loop.c (note_addr_stored): Remove check on MEM_IN_STRUCT_P. * optabs.c (gen_move_insn): Use MEM_COPY_ATTRIBUTES. * print-rtl.c (print_rtx): Print /f for frame_related. * recog.c (validate_replace_rtx_1): Use MEM_COPY_ATTRIBUTES. * reload1.c (reload): Copy MEM_SCALAR_P as well. * stmt.c (expand_decl): Use MEM_SET_IN_STRUCT_P. (expand_anon_union_decl): Use MEM_COPY_ATTRIBUTES. * varasm.c (make_decl_rtl): Use MEM_SET_IN_STRUCT_P. (output_constant_def): Likewise. * a29k.c (a29k_set_memflags_1): Take scalar_p. Set MEM_SCALAR_P. (a29k_set_memflags): Use it. * alpha.c (get_aligned_mem): Use MEM_COPY_ATTRIBUTES. * c4x.c (c4x_scan_for_ld): Likewise. * h8300.c (fix_bit_operand): Likewise. * m88k.c (legitimize_address): Likewise. (block_move_loop): Likewise. (block_move_no_loop): Likewise. (block_move_sequence): Likewise. (m88k_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * mips/abi64.h (SETUP_INCOMING_VARARGS): Likewise. * rs6000.c (expand_block_move_insn): Use MEM_COPY_ATTRIBUTES. * sh.c (sh_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * arm.h (arm_gen_load_multiple): Take scalar_p. (arm_store_load_multiple): Likewise. * arm.c (arm_gen_load_multiple): Likewise. (arm_gen_store_multiple): Likewise. (arm_gen_movstrqi): Treat MEM_SCALAR_P like MEM_IN_STRUCT_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24759 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c40
1 files changed, 10 insertions, 30 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 1d2a399bb49..d84849d6309 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -419,9 +419,8 @@ protect_from_queue (x, modify)
register rtx y = XEXP (x, 0);
register rtx new = gen_rtx_MEM (GET_MODE (x), QUEUED_VAR (y));
- MEM_IN_STRUCT_P (new) = MEM_IN_STRUCT_P (x);
RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (x);
- MEM_VOLATILE_P (new) = MEM_VOLATILE_P (x);
+ MEM_COPY_ATTRIBUTES (new, x);
MEM_ALIAS_SET (new) = MEM_ALIAS_SET (x);
if (QUEUED_INSN (y))
@@ -2021,7 +2020,7 @@ emit_group_store (orig_dst, src, ssize, align)
mem_in_struct_p set; we might not. */
dst = copy_rtx (orig_dst);
- MEM_IN_STRUCT_P (dst) = 1;
+ MEM_SET_IN_STRUCT_P (dst, 1);
}
/* Process the pieces. */
@@ -2091,7 +2090,7 @@ copy_blkmode_from_reg(tgtblk,srcreg,type)
if (tgtblk == 0)
{
tgtblk = assign_stack_temp (BLKmode, bytes, 0);
- MEM_IN_STRUCT_P (tgtblk) = AGGREGATE_TYPE_P (type);
+ MEM_SET_IN_STRUCT_P (tgtblk, AGGREGATE_TYPE_P (type));
preserve_temp_slots (tgtblk);
}
@@ -4544,8 +4543,8 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode,
GET_MODE_SIZE (GET_MODE (target)), 0);
rtx blk_object = copy_rtx (object);
- MEM_IN_STRUCT_P (object) = 1;
- MEM_IN_STRUCT_P (blk_object) = 1;
+ MEM_SET_IN_STRUCT_P (object, 1);
+ MEM_SET_IN_STRUCT_P (blk_object, 1);
PUT_MODE (blk_object, BLKmode);
if (bitsize != GET_MODE_BITSIZE (GET_MODE (target)))
@@ -4666,7 +4665,7 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode,
plus_constant (addr,
(bitpos
/ BITS_PER_UNIT))));
- MEM_IN_STRUCT_P (to_rtx) = 1;
+ MEM_SET_IN_STRUCT_P (to_rtx, 1);
MEM_ALIAS_SET (to_rtx) = alias_set;
return store_expr (exp, to_rtx, value_mode != VOIDmode);
@@ -6149,26 +6148,7 @@ expand_expr (exp, target, tmode, modifier)
|| (TREE_CODE (exp1) == ADDR_EXPR
&& (exp2 = TREE_OPERAND (exp1, 0))
&& AGGREGATE_TYPE_P (TREE_TYPE (exp2))))
- MEM_IN_STRUCT_P (temp) = 1;
-
- /* If the pointer is actually a REFERENCE_TYPE, this could be pointing
- into some aggregate too. In theory we could fold this into the
- previous check and use rtx_addr_varies_p there too.
-
- However, this seems safer. */
- if (!MEM_IN_STRUCT_P (temp)
- && (TREE_CODE (TREE_TYPE (exp1)) == REFERENCE_TYPE
- /* This may have been an array reference to the first element
- that was optimized away from being an addition. */
- || (TREE_CODE (exp1) == NOP_EXPR
- && ((TREE_CODE (TREE_TYPE (TREE_OPERAND (exp1, 0)))
- == REFERENCE_TYPE)
- || ((TREE_CODE (TREE_TYPE (TREE_OPERAND (exp1, 0)))
- == POINTER_TYPE)
- && (AGGREGATE_TYPE_P
- (TREE_TYPE (TREE_TYPE
- (TREE_OPERAND (exp1, 0))))))))))
- MEM_IN_STRUCT_P (temp) = ! rtx_addr_varies_p (temp);
+ MEM_SET_IN_STRUCT_P (temp, 1);
MEM_VOLATILE_P (temp) = TREE_THIS_VOLATILE (exp) | flag_volatile;
MEM_ALIAS_SET (temp) = get_alias_set (exp);
@@ -6527,7 +6507,7 @@ expand_expr (exp, target, tmode, modifier)
emit_move_insn (new, op0);
op0 = copy_rtx (new);
PUT_MODE (op0, BLKmode);
- MEM_IN_STRUCT_P (op0) = 1;
+ MEM_SET_IN_STRUCT_P (op0, 1);
}
return op0;
@@ -6554,7 +6534,7 @@ expand_expr (exp, target, tmode, modifier)
if (GET_CODE (XEXP (op0, 0)) == REG)
mark_reg_pointer (XEXP (op0, 0), alignment);
- MEM_IN_STRUCT_P (op0) = 1;
+ MEM_SET_IN_STRUCT_P (op0, 1);
MEM_VOLATILE_P (op0) |= volatilep;
if (mode == mode1 || mode1 == BLKmode || mode1 == tmode
|| modifier == EXPAND_CONST_ADDRESS
@@ -8573,7 +8553,7 @@ get_memory_rtx (exp)
is_aggregate = AGGREGATE_TYPE_P (type);
}
- MEM_IN_STRUCT_P (mem) = is_aggregate;
+ MEM_SET_IN_STRUCT_P (mem, is_aggregate);
return mem;
}
OpenPOWER on IntegriCloud