summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-11-28 10:26:35 -0800
committerH.J. Lu <hjl.tools@gmail.com>2017-11-28 10:26:35 -0800
commit359bc6e9940b0881ea6b5192dd472dc39e240a68 (patch)
tree91bd68f6ad13c674363e62703462e8f006f499bc
parent4d90987cd8976e73b21fd9e32542ae03345b8126 (diff)
downloadgcc-hjl/ix86_frame/gcc-7-branch.tar.gz
i386: More use reference of struct ix86_frame to avoid copyhjl/ix86_frame/gcc-7-branch
When there is no need to make a copy of ix86_frame, we can use reference of struct ix86_frame to avoid copy. * config/i386/i386.c (ix86_expand_prologue): Use reference of struct ix86_frame. (ix86_expand_epilogue): Likewise.
-rw-r--r--gcc/config/i386/i386.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index df741f0990d..5bbbc387a92 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -13666,7 +13666,6 @@ ix86_expand_prologue (void)
{
struct machine_function *m = cfun->machine;
rtx insn, t;
- struct ix86_frame frame;
HOST_WIDE_INT allocate;
bool int_registers_saved;
bool sse_registers_saved;
@@ -13690,7 +13689,7 @@ ix86_expand_prologue (void)
m->fs.sp_valid = true;
ix86_compute_frame_layout ();
- frame = m->frame;
+ struct ix86_frame &frame = cfun->machine->frame;
if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
{
@@ -14353,13 +14352,12 @@ ix86_expand_epilogue (int style)
{
struct machine_function *m = cfun->machine;
struct machine_frame_state frame_state_save = m->fs;
- struct ix86_frame frame;
bool restore_regs_via_mov;
bool using_drap;
ix86_finalize_stack_realign_flags ();
ix86_compute_frame_layout ();
- frame = m->frame;
+ struct ix86_frame &frame = cfun->machine->frame;
m->fs.sp_valid = (!frame_pointer_needed
|| (crtl->sp_is_unchanging