This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [sa]: Revert partial def stuff, use fake variables instead
Hello,
> > 2) To make things even more funny, we require that the ssa names with
> > the same pt_vars also have the same tag.
>
> This is also true, because it's necessary if we group.
> This is because the grouping algorithms may cause us to use the NMT
> name, instead of it's aliases, as the alias.
>
> If you have different names for the same set of pointed-to pointers, you
> either
> 1. are screwed
> 2. have to make sure to mark anything with the same set of pointed-to
> pointers as being in the same sets anyway, which causes the same
> quadratic behavior.
see group_aliases. We already have to look for pointers whose may-alias
set intersects with the group that is merged together.
> > So far I did not notice any reason for having NMT's at all -- it seems
> > to me that everything would work just fine (and much more efficiently)
> > if tree-ssa-operands just looked at pt_vars instead. What do I miss?
>
> That if you have too many pt_vars, the number of virtual variables
> explodes if you do that. In order to avoid having an infinite number of
> virtual variables that we are renaming to represent aliasing, we group
> if the number of virtual ops is going to be more than 500 in a single
> functions.
>
> If you don't group, you could certainly just use pt_vars (there may be
> some caveats to this right now that i'm sure diego know sabout).
As far as I can tell, the following approach should work as well,
without need for NMT's:
1) Find a pointer with largest pt_vars set S.
2) Create a new tag T to represent the set of variables S.
3) For each pointer P, if P->pt_vars has nonempty intersection with S,
set P->pt_vars = P->pt_vars \setminus S \cup {T}.
Zdenek