On Mon, Aug 06, 2018 at 11:14:17AM -0500, Vlad Lazar wrote:
> Hi,
> 
> The patch adds support for the TARGET_COMPUTE_FRAME_LAYOUT hook on AArch64
> and removes unneeded frame layout recalculation.
> 
> The removed aarch64_layout_frame calls are unnecessary because the functions 
> in which
> they appear will be called during or after the reload pass in which the 
> TARGET_COMPUTE_FRAME_LAYOUT
> hook is called. The if statement in aarch64_layout_frame had the purpose of 
> avoiding
> the extra work from the calls which have been removed and is now redundant.

I'm not sure I understand, I may be missing something as the frame layout
is complex, but I can't get where I need to be to accept your patch from this
comment.

The check you removed ensures that if we're after reload, and the frame is
laid out, we do no additional work. That part I understand, and that would
mean that any post-reload calls were no-ops. Is the argument that all
users of this code that you eliminate are after reload, and consequently
would have hit this no-op path? Can you talk me through why each case is
safe?

Thanks,
James

> gcc/
> 2018-08-06  Vlad Lazar  <vlad.la...@arm.com>
> 
>       * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
>       * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove 
> aarch64_layout_frame call.
>       (aarch64_expand_epilogue): Likewise.
>       (aarch64_initial_elimination_offset): Likewise.
>       (aarch64_get_separate_components): Likewise.
>       (aarch64_use_return_insn_p): Likewise.
>       (aarch64_layout_frame): Remove unneeded check.

Reply via email to