Commit 40d6e956 by Jan Hubicka Committed by Jan Hubicka

calls.c (precompute_arguments): Remove must_preallocate and args_size calls.

	* calls.c (precompute_arguments): Remove must_preallocate and
	args_size calls.
	(expand_call): Update call of precompute_arguments.

From-SVN: r33258
parent 44be169c
Wed Apr 19 12:02:37 MET DST 2000 Jan Hubicka <jh@suse.cz> Wed Apr 19 12:02:37 MET DST 2000 Jan Hubicka <jh@suse.cz>
* calls.c (precompute_arguments): Remove must_preallocate and
args_size calls.
(expand_call): Update call of precompute_arguments.
* loop.c (check_insn_for_bivs, for_every_insn_in_loop, * loop.c (check_insn_for_bivs, for_every_insn_in_loop,
check_insn_for_givs): Break out from ... check_insn_for_givs): Break out from ...
(strength_reduce) ... here; use for_every_insn_in_loop to call (strength_reduce) ... here; use for_every_insn_in_loop to call
......
...@@ -185,9 +185,8 @@ static void store_unaligned_arguments_into_pseudos PARAMS ((struct arg_data *, ...@@ -185,9 +185,8 @@ static void store_unaligned_arguments_into_pseudos PARAMS ((struct arg_data *,
static int finalize_must_preallocate PARAMS ((int, int, static int finalize_must_preallocate PARAMS ((int, int,
struct arg_data *, struct arg_data *,
struct args_size *)); struct args_size *));
static void precompute_arguments PARAMS ((int, int, int, static void precompute_arguments PARAMS ((int, int,
struct arg_data *, struct arg_data *));
struct args_size *));
static int compute_argument_block_size PARAMS ((int, static int compute_argument_block_size PARAMS ((int,
struct args_size *, struct args_size *,
int)); int));
...@@ -1417,23 +1416,17 @@ compute_argument_block_size (reg_parm_stack_space, args_size, ...@@ -1417,23 +1416,17 @@ compute_argument_block_size (reg_parm_stack_space, args_size,
FLAGS is mask of ECF_* constants. FLAGS is mask of ECF_* constants.
MUST_PREALLOCATE indicates that we must preallocate stack space for
any stack arguments.
NUM_ACTUALS is the number of arguments. NUM_ACTUALS is the number of arguments.
ARGS is an array containing information for each argument; this routine ARGS is an array containing information for each argument; this routine
fills in the INITIAL_VALUE and VALUE fields for each precomputed argument. fills in the INITIAL_VALUE and VALUE fields for each precomputed argument.
*/
ARGS_SIZE contains information about the size of the arg list. */
static void static void
precompute_arguments (flags, must_preallocate, num_actuals, args, args_size) precompute_arguments (flags, num_actuals, args)
int flags; int flags;
int must_preallocate;
int num_actuals; int num_actuals;
struct arg_data *args; struct arg_data *args;
struct args_size *args_size;
{ {
int i; int i;
...@@ -1448,15 +1441,13 @@ precompute_arguments (flags, must_preallocate, num_actuals, args, args_size) ...@@ -1448,15 +1441,13 @@ precompute_arguments (flags, must_preallocate, num_actuals, args, args_size)
on the stack, then we must precompute any parameter which contains a on the stack, then we must precompute any parameter which contains a
function call which will store arguments on the stack. function call which will store arguments on the stack.
Otherwise, evaluating the parameter may clobber previous parameters Otherwise, evaluating the parameter may clobber previous parameters
which have already been stored into the stack. */ which have already been stored into the stack. (we have code to avoid
such case by saving the ougoing stack arguments, but it results in
worse code) */
for (i = 0; i < num_actuals; i++) for (i = 0; i < num_actuals; i++)
if ((flags & (ECF_CONST | ECF_PURE)) if ((flags & (ECF_CONST | ECF_PURE))
|| ((args_size->var != 0 || args_size->constant != 0) || calls_function (args[i].tree_value, !ACCUMULATE_OUTGOING_ARGS))
&& calls_function (args[i].tree_value, 1))
|| (must_preallocate
&& (args_size->var != 0 || args_size->constant != 0)
&& calls_function (args[i].tree_value, 0)))
{ {
/* If this is an addressable type, we cannot pre-evaluate it. */ /* If this is an addressable type, we cannot pre-evaluate it. */
if (TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value))) if (TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value)))
...@@ -2481,8 +2472,7 @@ expand_call (exp, target, ignore) ...@@ -2481,8 +2472,7 @@ expand_call (exp, target, ignore)
structure_value_addr = copy_to_reg (structure_value_addr); structure_value_addr = copy_to_reg (structure_value_addr);
/* Precompute any arguments as needed. */ /* Precompute any arguments as needed. */
precompute_arguments (flags, must_preallocate, num_actuals, precompute_arguments (flags, num_actuals, args);
args, &args_size);
/* Now we are about to start emitting insns that can be deleted /* Now we are about to start emitting insns that can be deleted
if a libcall is deleted. */ if a libcall is deleted. */
......
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