i386: Use reference of struct ix86_frame to avoid copy
When there is no need to make a copy of ix86_frame, we can use reference of struct ix86_frame to avoid copy. Tested on x86-64. * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference of struct ix86_frame. (ix86_initial_elimination_offset): Likewise. (ix86_expand_split_stack_prologue): Likewise. From-SVN: r254480
This commit is contained in:
parent
53d855e09d
commit
9f8760ed72
2 changed files with 10 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
2017-11-06 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
|
||||
of struct ix86_frame.
|
||||
(ix86_initial_elimination_offset): Likewise.
|
||||
(ix86_expand_split_stack_prologue): Likewise.
|
||||
|
||||
2017-11-06 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
* tree-vrp.h (enum value_range_type): Update stale comment.
|
||||
|
|
|
@ -10486,8 +10486,6 @@ symbolic_reference_mentioned_p (rtx op)
|
|||
bool
|
||||
ix86_can_use_return_insn_p (void)
|
||||
{
|
||||
struct ix86_frame frame;
|
||||
|
||||
if (ix86_function_naked (current_function_decl))
|
||||
return false;
|
||||
|
||||
|
@ -10502,7 +10500,7 @@ ix86_can_use_return_insn_p (void)
|
|||
if (crtl->args.pops_args && crtl->args.size >= 32768)
|
||||
return 0;
|
||||
|
||||
frame = cfun->machine->frame;
|
||||
struct ix86_frame &frame = cfun->machine->frame;
|
||||
return (frame.stack_pointer_offset == UNITS_PER_WORD
|
||||
&& (frame.nregs + frame.nsseregs) == 0);
|
||||
}
|
||||
|
@ -10996,7 +10994,7 @@ ix86_can_eliminate (const int from, const int to)
|
|||
HOST_WIDE_INT
|
||||
ix86_initial_elimination_offset (int from, int to)
|
||||
{
|
||||
struct ix86_frame frame = cfun->machine->frame;
|
||||
struct ix86_frame &frame = cfun->machine->frame;
|
||||
|
||||
if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
|
||||
return frame.hard_frame_pointer_offset;
|
||||
|
@ -14334,7 +14332,6 @@ ix86_split_stack_guard (void)
|
|||
void
|
||||
ix86_expand_split_stack_prologue (void)
|
||||
{
|
||||
struct ix86_frame frame;
|
||||
HOST_WIDE_INT allocate;
|
||||
unsigned HOST_WIDE_INT args_size;
|
||||
rtx_code_label *label;
|
||||
|
@ -14346,7 +14343,7 @@ ix86_expand_split_stack_prologue (void)
|
|||
gcc_assert (flag_split_stack && reload_completed);
|
||||
|
||||
ix86_finalize_stack_frame_flags ();
|
||||
frame = cfun->machine->frame;
|
||||
struct ix86_frame &frame = cfun->machine->frame;
|
||||
allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
|
||||
|
||||
/* This is the label we will branch to if we have enough stack
|
||||
|
|
Loading…
Add table
Reference in a new issue