Commit 3668e76e by Jeff Law

calls.c (expand_call): Set MEM_IN_STRUCT_P as needed on return value from assign_stack_temp.

	* calls.c (expand_call): Set MEM_IN_STRUCT_P as needed on return
	value from assign_stack_temp.
	(store_one_arg): Likewise.
	* expr.c (save_noncopied_parts): Likewise.
	(expand_expr): Likewise.
	* function.c (assign_parms): Likewise.
	* integrate.c (expand_inline_function): Likewise.
	* stmt.c (expand_decl): Likewise.

From-SVN: r8708
parent 4879acf6
...@@ -684,6 +684,8 @@ expand_call (exp, target, ignore) ...@@ -684,6 +684,8 @@ expand_call (exp, target, ignore)
structure_value_addr structure_value_addr
= XEXP (assign_stack_temp (BLKmode, struct_value_size, 1), 0); = XEXP (assign_stack_temp (BLKmode, struct_value_size, 1), 0);
MEM_IN_STRUCT_P (structure_value_addr)
= AGGREGATE_TYPE_P (TREE_TYPE (exp));
target = 0; target = 0;
} }
} }
...@@ -1682,6 +1684,7 @@ expand_call (exp, target, ignore) ...@@ -1682,6 +1684,7 @@ expand_call (exp, target, ignore)
if (save_mode == BLKmode) if (save_mode == BLKmode)
{ {
save_area = assign_stack_temp (BLKmode, num_to_save, 1); save_area = assign_stack_temp (BLKmode, num_to_save, 1);
MEM_IN_STRUCT_P (save_area) = 0;
emit_block_move (validize_mem (save_area), stack_area, emit_block_move (validize_mem (save_area), stack_area,
GEN_INT (num_to_save), GEN_INT (num_to_save),
PARM_BOUNDARY / BITS_PER_UNIT); PARM_BOUNDARY / BITS_PER_UNIT);
...@@ -2949,6 +2952,8 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl, ...@@ -2949,6 +2952,8 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl,
{ {
arg->save_area = assign_stack_temp (BLKmode, arg->save_area = assign_stack_temp (BLKmode,
arg->size.constant, 1); arg->size.constant, 1);
MEM_IN_STRUCT_P (arg->save_area)
= AGGREGATE_TYPE_P (TREE_TYPE (arg->tree_value));
preserve_temp_slots (arg->save_area); preserve_temp_slots (arg->save_area);
emit_block_move (validize_mem (arg->save_area), stack_area, emit_block_move (validize_mem (arg->save_area), stack_area,
GEN_INT (arg->size.constant), GEN_INT (arg->size.constant),
......
...@@ -3727,6 +3727,7 @@ save_noncopied_parts (lhs, list) ...@@ -3727,6 +3727,7 @@ save_noncopied_parts (lhs, list)
tree to_be_saved = build (COMPONENT_REF, part_type, lhs, part); tree to_be_saved = build (COMPONENT_REF, part_type, lhs, part);
rtx target = assign_stack_temp (TYPE_MODE (part_type), rtx target = assign_stack_temp (TYPE_MODE (part_type),
int_size_in_bytes (part_type), 0); int_size_in_bytes (part_type), 0);
MEM_IN_STRUCT_P (target) = AGGREGATE_TYPE_P (part_type);
if (! memory_address_p (TYPE_MODE (part_type), XEXP (target, 0))) if (! memory_address_p (TYPE_MODE (part_type), XEXP (target, 0)))
target = change_address (target, TYPE_MODE (part_type), NULL_RTX); target = change_address (target, TYPE_MODE (part_type), NULL_RTX);
parts = tree_cons (to_be_saved, parts = tree_cons (to_be_saved,
...@@ -5025,6 +5026,7 @@ expand_expr (exp, target, tmode, modifier) ...@@ -5025,6 +5026,7 @@ expand_expr (exp, target, tmode, modifier)
(TREE_INT_CST_LOW (TYPE_SIZE (type)) (TREE_INT_CST_LOW (TYPE_SIZE (type))
+ BITS_PER_UNIT - 1) + BITS_PER_UNIT - 1)
/ BITS_PER_UNIT, 0); / BITS_PER_UNIT, 0);
MEM_IN_STRUCT_P (target) = AGGREGATE_TYPE_P (type);
} }
else else
target = gen_reg_rtx (tmode != VOIDmode ? tmode : mode); target = gen_reg_rtx (tmode != VOIDmode ? tmode : mode);
...@@ -6014,6 +6016,7 @@ expand_expr (exp, target, tmode, modifier) ...@@ -6014,6 +6016,7 @@ expand_expr (exp, target, tmode, modifier)
else else
{ {
target = assign_stack_temp (mode, int_size_in_bytes (type), 2); target = assign_stack_temp (mode, int_size_in_bytes (type), 2);
MEM_IN_STRUCT_P (target) = AGGREGATE_TYPE_P (type);
/* All temp slots at this level must not conflict. */ /* All temp slots at this level must not conflict. */
preserve_temp_slots (target); preserve_temp_slots (target);
DECL_RTL (slot) = target; DECL_RTL (slot) = target;
...@@ -6222,6 +6225,7 @@ expand_expr (exp, target, tmode, modifier) ...@@ -6222,6 +6225,7 @@ expand_expr (exp, target, tmode, modifier)
rtx memloc rtx memloc
= assign_stack_temp (inner_mode, = assign_stack_temp (inner_mode,
int_size_in_bytes (inner_type), 1); int_size_in_bytes (inner_type), 1);
MEM_IN_STRUCT_P (memloc) = AGGREGATE_TYPE_P (inner_type);
mark_temp_addr_taken (memloc); mark_temp_addr_taken (memloc);
emit_move_insn (memloc, op0); emit_move_insn (memloc, op0);
......
...@@ -3646,6 +3646,7 @@ assign_parms (fndecl, second_time) ...@@ -3646,6 +3646,7 @@ assign_parms (fndecl, second_time)
else else
copy = assign_stack_temp (TYPE_MODE (type), copy = assign_stack_temp (TYPE_MODE (type),
int_size_in_bytes (type), 1); int_size_in_bytes (type), 1);
MEM_IN_STRUCT_P (copy) = AGGREGATE_TYPE_P (type);
store_expr (parm, copy, 0); store_expr (parm, copy, 0);
emit_move_insn (parmreg, XEXP (copy, 0)); emit_move_insn (parmreg, XEXP (copy, 0));
......
...@@ -1271,6 +1271,7 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add ...@@ -1271,6 +1271,7 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add
rtx stack_slot rtx stack_slot
= assign_stack_temp (TYPE_MODE (TREE_TYPE (arg)), = assign_stack_temp (TYPE_MODE (TREE_TYPE (arg)),
int_size_in_bytes (TREE_TYPE (arg)), 1); int_size_in_bytes (TREE_TYPE (arg)), 1);
MEM_IN_STRUCT_P (stack_slot) = AGGREGATE_TYPE_P (TREE_TYPE (arg));
store_expr (arg, stack_slot, 0); store_expr (arg, stack_slot, 0);
......
...@@ -3248,6 +3248,7 @@ expand_decl (decl) ...@@ -3248,6 +3248,7 @@ expand_decl (decl)
/* An initializer is going to decide the size of this array. /* An initializer is going to decide the size of this array.
Until we know the size, represent its address with a reg. */ Until we know the size, represent its address with a reg. */
DECL_RTL (decl) = gen_rtx (MEM, BLKmode, gen_reg_rtx (Pmode)); DECL_RTL (decl) = gen_rtx (MEM, BLKmode, gen_reg_rtx (Pmode));
MEM_IN_STRUCT_P (DECL_RTL (decl)) = AGGREGATE_TYPE_P (type);
} }
else if (DECL_MODE (decl) != BLKmode else if (DECL_MODE (decl) != BLKmode
/* If -ffloat-store, don't put explicit float vars /* If -ffloat-store, don't put explicit float vars
...@@ -3309,6 +3310,7 @@ expand_decl (decl) ...@@ -3309,6 +3310,7 @@ expand_decl (decl)
+ BITS_PER_UNIT - 1) + BITS_PER_UNIT - 1)
/ BITS_PER_UNIT), / BITS_PER_UNIT),
1); 1);
MEM_IN_STRUCT_P (DECL_RTL (decl)) = AGGREGATE_TYPE_P (TREE_TYPE (decl));
/* Set alignment we actually gave this decl. */ /* Set alignment we actually gave this decl. */
DECL_ALIGN (decl) = (DECL_MODE (decl) == BLKmode ? BIGGEST_ALIGNMENT DECL_ALIGN (decl) = (DECL_MODE (decl) == BLKmode ? BIGGEST_ALIGNMENT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment