mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-10 22:17:27 +08:00
i386.c (ix86_compute_frame_layout): Recompute fast prologues only when amount of saved regs changed.
* i386.c (ix86_compute_frame_layout): Recompute fast prologues only when amount of saved regs changed. (ix86_init_machine_status): Initialize use_fast_prologue_epilgoue_nregs. * i386.h (machine_function): New fields use_fast_prologue_epilgoue_nregs. From-SVN: r64682
This commit is contained in:
parent
5dc96d60e1
commit
d7394366f2
@ -1,3 +1,10 @@
|
|||||||
|
Fri Mar 21 23:12:33 CET 2003 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
* i386.c (ix86_compute_frame_layout): Recompute fast prologues
|
||||||
|
only when amount of saved regs changed.
|
||||||
|
(ix86_init_machine_status): Initialize use_fast_prologue_epilgoue_nregs.
|
||||||
|
* i386.h (machine_function): New fields use_fast_prologue_epilgoue_nregs.
|
||||||
|
|
||||||
Fri Mar 21 22:44:33 CET 2003 Jan Hubicka <jh@suse.cz>
|
Fri Mar 21 22:44:33 CET 2003 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
PR inline-asm/7916
|
PR inline-asm/7916
|
||||||
|
@ -4914,10 +4914,16 @@ ix86_compute_frame_layout (frame)
|
|||||||
frame->nregs = ix86_nsaved_regs ();
|
frame->nregs = ix86_nsaved_regs ();
|
||||||
total_size = size;
|
total_size = size;
|
||||||
|
|
||||||
if (!optimize_size && !reload_completed)
|
/* During reload iteration the amount of registers saved can change.
|
||||||
|
Recompute the value as needed. Do not recompute when amount of registers
|
||||||
|
didn't change as reload does mutiple calls to the function and does not
|
||||||
|
expect the decision to change within single iteration. */
|
||||||
|
if (!optimize_size
|
||||||
|
&& cfun->machine->use_fast_prologue_epilogue_nregs != frame->nregs)
|
||||||
{
|
{
|
||||||
int count = frame->nregs;
|
int count = frame->nregs;
|
||||||
|
|
||||||
|
cfun->machine->use_fast_prologue_epilogue_nregs = count;
|
||||||
/* The fast prologue uses move instead of push to save registers. This
|
/* The fast prologue uses move instead of push to save registers. This
|
||||||
is significantly longer, but also executes faster as modern hardware
|
is significantly longer, but also executes faster as modern hardware
|
||||||
can execute the moves in parallel, but can't do that for push/pop.
|
can execute the moves in parallel, but can't do that for push/pop.
|
||||||
@ -11784,7 +11790,10 @@ ix86_expand_call (retval, fnaddr, callarg1, callarg2, pop, sibcall)
|
|||||||
static struct machine_function *
|
static struct machine_function *
|
||||||
ix86_init_machine_status ()
|
ix86_init_machine_status ()
|
||||||
{
|
{
|
||||||
return ggc_alloc_cleared (sizeof (struct machine_function));
|
struct machine_function *f;
|
||||||
|
|
||||||
|
f = ggc_alloc_cleared (sizeof (struct machine_function));
|
||||||
|
f->use_fast_prologue_epilogue_nregs = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return a MEM corresponding to a stack slot with mode MODE.
|
/* Return a MEM corresponding to a stack slot with mode MODE.
|
||||||
|
@ -3223,6 +3223,9 @@ struct machine_function GTY(())
|
|||||||
/* Set by ix86_compute_frame_layout and used by prologue/epilogue expander to
|
/* Set by ix86_compute_frame_layout and used by prologue/epilogue expander to
|
||||||
determine the style used. */
|
determine the style used. */
|
||||||
int use_fast_prologue_epilogue;
|
int use_fast_prologue_epilogue;
|
||||||
|
/* Number of saved registers USE_FAST_PROLOGUE_EPILOGUE has been computed
|
||||||
|
for. */
|
||||||
|
int use_fast_prologue_epilogue_nregs;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ix86_stack_locals (cfun->machine->stack_locals)
|
#define ix86_stack_locals (cfun->machine->stack_locals)
|
||||||
|
Loading…
Reference in New Issue
Block a user