]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386: Use const reference of struct ix86_frame to avoid copy
authorH.J. Lu <hjl@gcc.gnu.org>
Mon, 16 Apr 2018 18:44:43 +0000 (11:44 -0700)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 16 Apr 2018 18:44:43 +0000 (11:44 -0700)
We can use const reference of struct ix86_frame to avoid making a local
copy of ix86_frame.  ix86_expand_epilogue makes a local copy of struct
ix86_frame and uses the reg_save_offset field as a local variable.  This
patch uses a separate local variable for reg_save_offset.

Tested on x86-64 with ada.

Backport from mainline
PR target/83905
* config/i386/i386.c (ix86_expand_prologue): Use cost reference
of struct ix86_frame.
(ix86_expand_epilogue): Likewise.  Add a local variable for
the reg_save_offset field in struct ix86_frame.

From-SVN: r259411

gcc/ChangeLog

index 36da2d8b75cd574638bcc155d91b43e1ae2b14f5..c34eb965faca5c4dc78139bd19c725c850b017dd 100644 (file)
@@ -1,3 +1,12 @@
+2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+       Backport from mainline
+       PR target/83905
+       * config/i386/i386.c (ix86_expand_prologue): Use cost reference
+       of struct ix86_frame.
+       (ix86_expand_epilogue): Likewise.  Add a local variable for
+       the reg_save_offset field in struct ix86_frame.
+
 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
 
        Backport from mainline