From ef8588efb65f09eb6c54cb805b8563a70e82c5cf Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 16 Apr 2018 11:44:43 -0700 Subject: [PATCH] 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 --- gcc/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.47.2