Commit 5141868d by Richard Sandiford Committed by Richard Sandiford

tree.h (set_decl_incoming_rtl): Add a by_reference_p parameter.

gcc/
	* tree.h (set_decl_incoming_rtl): Add a by_reference_p parameter.
	* emit-rtl.c (set_decl_incoming_rtl): Likewise.  Don't set the
	rtl's register attributes when the parameter is true.
	* function.c (assign_parms_unsplit_complex, assign_parms)
	(expand_function_start): Update calls to set_decl_incoming_rtl.

From-SVN: r131056
parent 38ae7651
2007-12-19 Richard Sandiford <rsandifo@nildram.co.uk>
* tree.h (set_decl_incoming_rtl): Add a by_reference_p parameter.
* emit-rtl.c (set_decl_incoming_rtl): Likewise. Don't set the
rtl's register attributes when the parameter is true.
* function.c (assign_parms_unsplit_complex, assign_parms)
(expand_function_start): Update calls to set_decl_incoming_rtl.
2007-12-19 Richard Sandiford <rsandifo@nildram.co.uk>
* rtl.def (SUBREG): Update comments.
* rtl.h (reg_attrs): Be explicit about the type of offset used.
(set_reg_attrs_from_mem): Rename to...
......@@ -1045,13 +1045,14 @@ set_decl_rtl (tree t, rtx x)
set_reg_attrs_for_decl_rtl (t, x);
}
/* Assign the RTX X to parameter declaration T. */
/* Assign the RTX X to parameter declaration T. BY_REFERENCE_P is true
if the ABI requires the parameter to be passed by reference. */
void
set_decl_incoming_rtl (tree t, rtx x)
set_decl_incoming_rtl (tree t, rtx x, bool by_reference_p)
{
DECL_INCOMING_RTL (t) = x;
if (x)
if (x && !by_reference_p)
set_reg_attrs_for_decl_rtl (t, x);
}
......
......@@ -2973,13 +2973,13 @@ assign_parms_unsplit_complex (struct assign_parm_data_all *all, tree fnargs)
imag = gen_lowpart_SUBREG (inner, imag);
}
tmp = gen_rtx_CONCAT (DECL_MODE (parm), real, imag);
set_decl_incoming_rtl (parm, tmp);
set_decl_incoming_rtl (parm, tmp, false);
fnargs = TREE_CHAIN (fnargs);
}
else
{
SET_DECL_RTL (parm, DECL_RTL (fnargs));
set_decl_incoming_rtl (parm, DECL_INCOMING_RTL (fnargs));
set_decl_incoming_rtl (parm, DECL_INCOMING_RTL (fnargs), false);
/* Set MEM_EXPR to the original decl, i.e. to PARM,
instead of the copy of decl, i.e. FNARGS. */
......@@ -3035,7 +3035,7 @@ assign_parms (tree fndecl)
}
/* Record permanently how this parm was passed. */
set_decl_incoming_rtl (parm, data.entry_parm);
set_decl_incoming_rtl (parm, data.entry_parm, data.passed_pointer);
/* Update info on where next arg arrives in registers. */
FUNCTION_ARG_ADVANCE (all.args_so_far, data.promoted_mode,
......@@ -4259,7 +4259,7 @@ expand_function_start (tree subr)
tree parm = cfun->static_chain_decl;
rtx local = gen_reg_rtx (Pmode);
set_decl_incoming_rtl (parm, static_chain_incoming_rtx);
set_decl_incoming_rtl (parm, static_chain_incoming_rtx, false);
SET_DECL_RTL (parm, local);
mark_reg_pointer (local, TYPE_ALIGN (TREE_TYPE (TREE_TYPE (parm))));
......
......@@ -5135,7 +5135,7 @@ extern tree walk_tree_without_duplicates_1 (tree*, walk_tree_fn, void*,
/* Assign the RTX to declaration. */
extern void set_decl_rtl (tree, rtx);
extern void set_decl_incoming_rtl (tree, rtx);
extern void set_decl_incoming_rtl (tree, rtx, bool);
/* Enum and arrays used for tree allocation stats.
Keep in sync with tree.c:tree_node_kind_names. */
......
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