This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/4] aarch64: Tidy prologue local variables


On 28/08/14 17:48, Richard Henderson wrote:
On 08/26/2014 05:58 AM, Jiong Wang wrote:

there is a field "hardfp_offset" in aarch64_frame, and I think that field is
not used and not initialized correctly.

how about hoisting the calculation to aarch64_layout_frame to avoid duplicated
calcuation here and there,  something like:

  cfun->machine->frame.hardfp_offset = (cfun->machine->frame.frame_size-
                                        cfun->machine->frame.hard_fp_offset);

then use it directly in expand_epilogue:

fp_offset = cfun->machine->frame.hardfp_offset;
I'd go the other way, and simply delete hardfp_offset as unused.  We need the
other two inputs to the subtraction for other reasons, so we don't save
anything by pre-computing the subtract.

make sense.

thanks.

-- Jiong


r~





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]