This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/83905] ix86_expand_epilogue modifies the copy of cfun->machine->frame
- From: "hjl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Apr 2018 18:45:25 +0000
- Subject: [Bug target/83905] ix86_expand_epilogue modifies the copy of cfun->machine->frame
- Auto-submitted: auto-generated
- References: <bug-83905-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83905
--- Comment #5 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Mon Apr 16 18:44:43 2018
New Revision: 259411
URL: https://gcc.gnu.org/viewcvs?rev=259411&root=gcc&view=rev
Log:
i386: Use const reference of struct ix86_frame to avoid copy
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.
Modified:
branches/gcc-6-branch/gcc/ChangeLog