Commit ebef2728 by Richard Kenner

(expand_call): When preserving subexpressions, don't put expensive

arguments directly into hard registers.

From-SVN: r6543
parent 99360286
/* Convert function calls to rtl insns, for GNU C compiler. /* Convert function calls to rtl insns, for GNU C compiler.
Copyright (C) 1989, 1992, 1993 Free Software Foundation, Inc. Copyright (C) 1989, 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -1566,6 +1566,18 @@ expand_call (exp, target, ignore) ...@@ -1566,6 +1566,18 @@ expand_call (exp, target, ignore)
= convert_modes (args[i].mode, = convert_modes (args[i].mode,
TYPE_MODE (TREE_TYPE (args[i].tree_value)), TYPE_MODE (TREE_TYPE (args[i].tree_value)),
args[i].value, args[i].unsignedp); args[i].value, args[i].unsignedp);
/* If the value is expensive, and we are inside an appropriately
short loop, put the value into a pseudo and then put the pseudo
into the hard reg. */
if ((! (GET_CODE (args[i].value) == REG
|| (GET_CODE (args[i].value) == SUBREG
&& GET_CODE (SUBREG_REG (args[i].value)) == REG)))
&& args[i].mode != BLKmode
&& rtx_cost (args[i].value, SET) > 2
&& preserve_subexpressions_p ())
args[i].value = copy_to_mode_reg (args[i].mode, args[i].value);
} }
#if defined(ACCUMULATE_OUTGOING_ARGS) && defined(REG_PARM_STACK_SPACE) #if defined(ACCUMULATE_OUTGOING_ARGS) && defined(REG_PARM_STACK_SPACE)
......
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