On 3 December 2014 at 14:36, Martin Jambor <mjam...@suse.cz> wrote:
> 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).

Can't you use align=1, misalign=0 for TOP ? This means that we don't
know anything useful about the pointer yet, just that it's a multiple
of 1 (which is trivially true for all pointers, isn't it?).

When you have vectors of these struct they will pack MUCH more nicely
without the "bool known" field.

Thanks,
Jay.

Reply via email to