From: H.J. Lu Date: Mon, 16 Apr 2018 18:44:43 +0000 (-0700) Subject: i386: Use const reference of struct ix86_frame to avoid copy X-Git-Tag: releases/gcc-6.5.0~380 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef8588efb65f09eb6c54cb805b8563a70e82c5cf;p=thirdparty%2Fgcc.git 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. From-SVN: r259411 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36da2d8b75cd..c34eb965faca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2018-04-16 H.J. Lu + + 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 Backport from mainline