On Wed, Nov 27, 2013 at 1:29 PM, Eric Botcazou <ebotca...@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

Reply via email to