This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR target/61296: Excessive alignment in ix86_data_alignment
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, Petr Murzin <petrmurzin1 at gmail dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Date: Wed, 17 Dec 2014 06:49:01 -0800
- Subject: Re: PATCH: PR target/61296: Excessive alignment in ix86_data_alignment
- Authentication-results: sourceware.org; auth=none
- References: <20141217131036 dot GA18450 at gmail dot com> <CAFULd4YgHX3HBn7FE4t6_Z_aW905fTMiPz1tA+hHbPpLsBQu=w at mail dot gmail dot com>
On Wed, Dec 17, 2014 at 03:31:50PM +0100, Uros Bizjak wrote:
> On Wed, Dec 17, 2014 at 2:10 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>
> > Add -malign-data={abi|compat,cachineline} to control how GCC aligns
> > variables. "compat" uses increased alignment value compatible with
> > GCC 4.8 and earlier, "abi" uses alignment value as specified by the
> > psABI, and "cacheline" with increased alignment value to match the
> > cache line size. "compat" is the default.
> >
> > gcc/
> >
> > PR target/61296
> > * config/i386/i386-opts.h (ix86_align_data): New enum.
> > * config/i386/i386.c (ix86_data_alignment): Return the ABI
> > alignment value for -malign-data=abi, the cachine line size
> > for -malign-data=cachineline and the older GCC compatible
> > alignment value for for -malign-data=compat.
> > * config/i386/i386.opt (malign-data=): New.
> > * doc/invoke.texi: Document -malign-data=.
>
> Please also mention new user-visible options in GCC changes document.
>
Here is a patch. OK to install?
> (Oh, just spotted a trivial typo in the ChangeLog entry: cachineline
> -> cacheline).
Fixed.
Thanks.
H.J.
---
Index: gcc-5/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-5/changes.html,v
retrieving revision 1.52
diff -u -p -r1.52 changes.html
--- gcc-5/changes.html 15 Dec 2014 19:55:08 -0000 1.52
+++ gcc-5/changes.html 17 Dec 2014 14:48:21 -0000
@@ -444,6 +444,13 @@ void operator delete[] (void *, std::siz
place of the __fentry__ or mcount call, so that a call per function
can be later patched in. This can be used for low overhead tracing or
hot code patching.</li>
+ <li> The new <code>-malign-data=</code> option to control how
+ GCC aligns variables. <code>-malign-data=compat</code> uses
+ increased alignment value compatible with GCC 4.8 and earlier,
+ <code>-malign-data=abi</code> uses alignment value as specified by
+ the psABI, and <code>-malign-data=cacheline</code> uses increased
+ alignment value to match the cache line size.
+ <code>-malign-data=compat</code> is the default.</li>
</ul>
<h3 id="sh">SH</h3>