aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2000-04-19 14:41:03 +0000
committerJan Hubicka <hubicka@gcc.gnu.org>2000-04-19 14:41:03 +0000
commit40d6e956681de2e7204030f005a7ea6951d04407 (patch)
tree170bce3c6f6bfce0a03b503619811d079d38925a
parent44be169cb5ff11beefbb0061e3e2bed0a30d2677 (diff)
downloadgcc-40d6e956681de2e7204030f005a7ea6951d04407.zip
gcc-40d6e956681de2e7204030f005a7ea6951d04407.tar.gz
gcc-40d6e956681de2e7204030f005a7ea6951d04407.tar.bz2
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
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/calls.c30
2 files changed, 14 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index efdf774..e7ecc5e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
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,
check_insn_for_givs): Break out from ...
(strength_reduce) ... here; use for_every_insn_in_loop to call
diff --git a/gcc/calls.c b/gcc/calls.c
index 2592a8e..e61fc8f 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -185,9 +185,8 @@ static void store_unaligned_arguments_into_pseudos PARAMS ((struct arg_data *,
static int finalize_must_preallocate PARAMS ((int, int,
struct arg_data *,
struct args_size *));
-static void precompute_arguments PARAMS ((int, int, int,
- struct arg_data *,
- struct args_size *));
+static void precompute_arguments PARAMS ((int, int,
+ struct arg_data *));
static int compute_argument_block_size PARAMS ((int,
struct args_size *,
int));
@@ -1417,23 +1416,17 @@ compute_argument_block_size (reg_parm_stack_space, args_size,
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.
ARGS is an array containing information for each argument; this routine
- fills in the INITIAL_VALUE and VALUE fields for each precomputed argument.
-
- ARGS_SIZE contains information about the size of the arg list. */
+ fills in the INITIAL_VALUE and VALUE fields for each precomputed argument.
+ */
static void
-precompute_arguments (flags, must_preallocate, num_actuals, args, args_size)
+precompute_arguments (flags, num_actuals, args)
int flags;
- int must_preallocate;
int num_actuals;
struct arg_data *args;
- struct args_size *args_size;
{
int i;
@@ -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
function call which will store arguments on the stack.
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++)
if ((flags & (ECF_CONST | ECF_PURE))
- || ((args_size->var != 0 || args_size->constant != 0)
- && calls_function (args[i].tree_value, 1))
- || (must_preallocate
- && (args_size->var != 0 || args_size->constant != 0)
- && calls_function (args[i].tree_value, 0)))
+ || calls_function (args[i].tree_value, !ACCUMULATE_OUTGOING_ARGS))
{
/* If this is an addressable type, we cannot pre-evaluate it. */
if (TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value)))
@@ -2481,8 +2472,7 @@ expand_call (exp, target, ignore)
structure_value_addr = copy_to_reg (structure_value_addr);
/* Precompute any arguments as needed. */
- precompute_arguments (flags, must_preallocate, num_actuals,
- args, &args_size);
+ precompute_arguments (flags, num_actuals, args);
/* Now we are about to start emitting insns that can be deleted
if a libcall is deleted. */