This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Do less generous pointer globbing in alias.c
- From: Richard Biener <rguenther at suse dot de>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 27 May 2015 17:25:10 +0200
- Subject: Re: Do less generous pointer globbing in alias.c
- Authentication-results: sourceware.org; auth=none
- References: <20150527052850 dot GB88897 at kam dot mff dot cuni dot cz> <alpine dot LSU dot 2 dot 11 dot 1505271046320 dot 30088 at zhemvz dot fhfr dot qr> <20150527144221 dot GB51385 at kam dot mff dot cuni dot cz> <20150527145821 dot GC51385 at kam dot mff dot cuni dot cz> <20150527150413 dot GD51385 at kam dot mff dot cuni dot cz>
On May 27, 2015 5:04:13 PM GMT+02:00, Jan Hubicka <hubicka@ucw.cz> wrote:
>> > Yes, so is
>> >
>> > struct foo {struct bar a;};
>> >
>> > a.a = ...
>> > ... = a;
>> >
>> > and
>> >
>> > a = ...
>> > ... = a.a;
>> >
>> > this is why conflict is symmetrization of the subset relation.
>>
>>
>> OK the statement above is true, but subsets alone are not quite right
>for use
>> in aliasing_component_refs_p
>>
>> void *a;
>> char **ptr=&a;
>> *ptr = ....
>>
>> is defined for us, but the structure-substructure equivalent is not.
>> I will implement the variant with extra flag after teaching and send
>updated
>> patch.
>
>Hmm, what about
>
>union t {int a; char b;};
>
>int a;
>uniont t *ptr=&a;
>*ptr = ...
>
>If we want to define this, aliasing_component_refs_p would IMO need to
>be symmetrized, too.
>I am happy leaving this undefined.
Globbing all pointers was soo simple... :)
Note that we are in the middle-end here and have to find cross-language common grounds. People may experience regressions towards the previous globbing so I guess the question is which is the globbing we want to remove - that is, what makes the most difference in code-generation?
Richard.
>Honza