i386: Use const reference of struct ix86_frame to avoid copy
commite23364fce302e5c6f45ca8a8ffebfdef84638f98
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Jan 2018 19:30:32 +0000 (23 19:30 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Jan 2018 19:30:32 +0000 (23 19:30 +0000)
tree8753b6e58fcf8b59cdc63f9748f6f99d97c1b9dd
parent8df28d5e3995e18e3b04c66577425c3b06f0639a
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.

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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256996 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/i386/i386.c