This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Make IPA-CP propagate alignment information of pointers
- From: Martin Jambor <mjambor at suse dot cz>
- To: Jay Foad <jay dot foad at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 3 Dec 2014 15:36:49 +0100
- Subject: Re: [PATCH] Make IPA-CP propagate alignment information of pointers
- Authentication-results: sourceware.org; auth=none
- References: <20141115010412 dot GA32699 at virgil dot suse> <CAFiYyc277oyxjOYjrLtEMLkjarTfzQhTuG=onN9BR6zwd481CQ at mail dot gmail dot com> <20141118233253 dot GD5167 at virgil dot suse> <20141201173559 dot GE8214 at virgil dot suse> <20141201224058 dot GC11741 at kam dot mff dot cuni dot cz> <20141202201411 dot GI8214 at virgil dot suse> <CANd1uZmQd9Qw3pN414KT=nV61NhwGG6PD3-a_7TbXmeQAh+BoQ at mail dot gmail dot com>
Hi,
thank you very much for pointing out all the spelling mistakes. I
suppose you could tell I was writing this in a hurry :-) Nevertheless
I should probably make a habit of spell checking stuff before
sending it out.
As far as your question is concerned:
On Wed, Dec 03, 2014 at 10:53:54AM +0000, Jay Foad wrote:
> > Index: src/gcc/ipa-prop.h
> > ===================================================================
> > --- src.orig/gcc/ipa-prop.h
> > +++ src/gcc/ipa-prop.h
> > @@ -144,6 +144,17 @@ struct GTY(()) ipa_agg_jump_function
> >
> > typedef struct ipa_agg_jump_function *ipa_agg_jump_function_p;
> >
> > +/* Info about poiner alignments. */
>
> "pointer"
>
> > +struct GTY(()) ipa_alignment
> > +{
> > + /* The data fields below are valid only if known is true. */
> > + bool known;
>
> Just curious: why is the "known" flag necessary? The comments for
> ptr_info_def say that align=0 means unknown.
It is necessary. In IPA-CP, when know is false, this means the
lattice is in TOP state (i.e. once we learn something about the
parameter, let's overwrite this), whereas when it is true and
alignment is 0, it means it is in BOTTOM state (i.e. we know we cannot
rely on this and never will be able to).
Thanks,
Martin