This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Remove "keep_aligning" from get_inner_reference
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Bernd Edlinger <bernd dot edlinger at hotmail dot de>, Martin Jambor <mjambor at suse dot cz>, Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 27 Nov 2013 13:35:42 +0100
- Subject: Re: [PATCH] Remove "keep_aligning" from get_inner_reference
- Authentication-results: sourceware.org; auth=none
- References: <20130910193228 dot GE6732 at virgil dot suse> <11089176 dot P1umEoB5Oc at polaris> <CAFiYyc1v1oVWF-WzKdiGbWh6tq-dXXhWacSXYXzeypSUTo9kvQ at mail dot gmail dot com> <16305464 dot d0TmrtbqLF at polaris>
On Wed, Nov 27, 2013 at 1:29 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> I'm fine with reverting it for now (you were in CC of the patch submission
>> but silent on it, I asked for the patch to start simplifying the way
>> mems are expanded - ultimately to avoid the recursion and mem-attribute
>> compute by the recursion).
>
> Because I'm totally lost in this thread and its many sub-threads.
>
>> We can come back during stage1.
>
> Sure, let's do that instead and not enter stage #3 with hazardous changes.
>
>> get_object_alignment should be able to properly handle this case
>> if you call it on the full reference in the normal_inner_ref: case.
>
> How exactly? Once you flatten everything with get_inner_reference at the
> beginning, the TYPE_ALIGN_OK flag on the VIEW_CONVERT_EXPR is lost.
Well, I want
tem = get_inner_reference (from, ...);
op = expand_expr (tem);
...
set_mem_attrs (op, from);
instead of setting mem_attrs from 'tem' by some obfuscated means of
recursing through multiple levels of expanding the memory reference.
That is, completely refactor this stuff as it has become so non-obvious
what happens.
>> All the weird duplicate code on the VIEW_CONVERT_EXPR case
>> should IMHO go.
>
> What has changed since 2004 exactly? If you do a grep for TYPE_ALIGN_OK on
> 4.1 and 4.9 trees, you get exactly the same 4 occurrences in the middle-end.
Ah, get_object_alignment used keep_aligning ...
Richard.
> --
> Eric Botcazou