This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Revert DECL_USER_ALIGN part of r241959
- From: Richard Sandiford <richard dot sandiford at linaro dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 05 Jan 2018 10:25:35 +0000
- Subject: Re: Revert DECL_USER_ALIGN part of r241959
- Authentication-results: sourceware.org; auth=none
- References: <87k1wzm176.fsf@linaro.org> <CAFiYyc2katnFOvm7Qy4Pdo7g0zw2bPnofOPc_otxtMc-hYH-ng@mail.gmail.com> <CAFiYyc3N2BX-zFa3HQPR=L2p6GjOo+SVcmyTf2ZoQa4sho1kOw@mail.gmail.com> <87efn4my7v.fsf@linaro.org> <20180105100403.GA1833@tucnak>
Jakub Jelinek <jakub@redhat.com> writes:
> On Fri, Jan 05, 2018 at 09:49:56AM +0000, Richard Sandiford wrote:
>> Is the patch OK as a compromise for GCC 8? We don't speculatively
>> increase the user alignment in increase_alignment, but do still increase
>> it if it helps to vectorise a particular loop access?
>
> I'd be a little bit worried about code that puts some variables into user
> sections with specific alignment, i.e.
> __attribute__((section ("whatever"), aligned(N)))
> where data is collected from different TUs into the user section and
> any padding added there breaks this. E.g. Linux kernel and other programs
> use this technique heavily.
Looking again, it seems we already prevent increasing alignment for
the "used" attribute (with or without "aligned"). Is that good enough?
That kind of construct is used without "aligned" too, and I think it
should have "used" to stop it being removed as dead.
Thanks,
Richard