This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch AArch64] Do not increase data alignment at -Os and with -fconserve-stack.
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Ramana Radhakrishnan <ramana dot radhakrishnan at foss dot arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, <nd at arm dot com>
- Date: Thu, 8 Jun 2017 17:48:09 +0100
- Subject: Re: [Patch AArch64] Do not increase data alignment at -Os and with -fconserve-stack.
- 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: <3f42e722-36e6-ad2b-29ec-84aab588cafe@foss.arm.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Tue, May 02, 2017 at 10:52:13AM +0100, Ramana Radhakrishnan wrote:
> We unnecessarily align data to 8 byte alignments even when -Os is
> specified. This brings the logic in the AArch64 backend more in line
> with the ARM backend and helps gain some image size in a few places.
> Caught by an internal report on the size of rodata sections being
> high with aarch64 gcc.
>
> * config/aarch64/aarch64.h (AARCH64_EXPAND_ALIGNMENT): New.
> (DATA_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
> (LOCAL_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
>
> Bootstrapped and regression tested on aarch64-none-linux-gnu with no
> regressions.
>
> Ok to commit ?
OK.
Thanks,
James