This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix PR 33870

On Nov 14, 2007 1:41 PM, Diego Novillo <> wrote:
> Richard Guenther wrote:
> > No, we are limiting all pointed-to SFTs of all structs (maybe this was not
> > intended, but it is necessary) out of the partitioner.
> *All* of them?  That's a bug.  Only the first one inside a nested
> structure should be limited.

Yes, for

 struct X {
    int i;
  } m;

the SFT for &m.i; has nesting level 1.  And this is required - see the example
with the toplevel array that is still failing.

> > but clearly you are growing the numer of symbols in NMTs
> > (the regression is not as bad as for my initial patch, but is the least
> > regression we can have there if we want to fix the miscompilation this way).
> Yes, but we should only be adding as many SFTs as nested structures we
> have.  So, to give you a ridiculous example, if we had a structure with
> 300 fields and 2 nested structures, we should only have 2
> unpartitionable SFTs (the first one of each nested structure).

Huh?  No, all pointed-to SFTs are unpartitionable. So,

 struct X {
   struct Y {
     int i1;
     int i2;


makes all SFTs that belong to i1, i2, etc. unpartitionable.  At least that's
how your code works ;)

I guess in add_uids_for_ptset instead of

!                     if (SFT_NESTING_LEVEL (sft) > 0)
!                       SFT_UNPARTITIONABLE_P (sft) = true;

we can get away with only doing that if the type of the SFT itself could
have subvariables (which is probably again what you intended?).

> > We enlarge the NMT aliased symbols.  (And obviously we can now create
> > aritifical testcases with any number of aliased SFTs remaining on a stmt,
> > I'll come up with one of those for you)
> Thanks.  The secret here is going to be one where we are marking way too
> many SFTs as unpartitionable.  My contention is that we shouldn't be
> doing this too often.  If we are, that's the bug.

Probably the latter then.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]