This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Remove aarch64_frame_pointer_required
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Tue, 7 Nov 2017 17:05:13 +0000
- Subject: Re: [PATCH][AArch64] Remove aarch64_frame_pointer_required
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com;
- Nodisclaimer: True
- References: <DB6PR0801MB205392DA3F942C111AD4572783B60@DB6PR0801MB2053.eurprd08.prod.outlook.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Fri, Aug 04, 2017 at 01:41:22PM +0100, Wilco Dijkstra wrote:
> To implement -fomit-leaf-frame-pointer, there are 2 places where we need
> to check whether we have to use a frame chain (since register allocation
> may allocate LR in a leaf function that omits the frame pointer, but if
> LR is spilled we must emit a frame chain). To simplify this do not force
> frame_pointer_needed via aarch64_frame_pointer_required, but enable the
> frame chain in aarch64_layout_frame. Now aarch64_frame_pointer_required
> can be removed and aarch64_can_eliminate is simplified.
>
> OK for commit?
I've thought about this for a while, I'm still not completely comfortable
with the idea that we "lie" to the mid-end about the frame-pointer, and
patch it up in the frame layout code, but I can see how we're moving from
one lie which adds a ton of complexity, to a different lie which reduces
complexity.
It all still seems tenuous, but I think I understand the reasoning, and
we've got a solid 6 months to figure out what breaks.
OK (assuming this has been tested *recently* against aarch64-none-linux-gnu).
Reviewed-By: James Greenhalgh <james.greenhalgh@arm.com>
Thanks,
James
>
> ChangeLog:
> 2017-08-03 Wilco Dijkstra <wdijkstr@arm.com>
>
> gcc/
> * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
> Remove.
> (aarch64_layout_frame): Initialise emit_frame_chain.
> (aarch64_can_eliminate): Remove omit leaf frame pointer code.
> (TARGET_FRAME_POINTER_REQUIRED): Remove define.