This is the mail archive of the gcc-patches@gcc.gnu.org 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: [sa]: Revert partial def stuff, use fake variables instead


On Thu, 2004-12-23 at 03:41 +0100, Zdenek Dvorak wrote:
> Hello,
> 
> > It may be easiest to just have an external interface for creating tags 
> > with a known points-to set, and taking care of all the magic 
> > involved inside tree-ssa-alias, which knows how to do this stuff right.
> 
> here is some attempt (see the set_single_alias function).  It does not
> quite work yet, but already there a few things that quite surprised me
> (some of the observations below obviously may be wrong, so feel free
> to correct me if I misunderstood something):
> 
> 1) both pt_vars in ptr_info_def and aliases in name_mem_tag seem to
>    contain exactly the same information.  The former seems to only be
>    used internally by alias analysis, while the later is much more
>    bloated (varray) version used mainly by tree-ssa-operands.

This is true, except when we group.
> 
> 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.

>   This forces the function
>    to look through all other pointers, and automatically causes a
>    quadratic behavior in any code that would be foolish enough to try
>    to use it.

> 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).



--Dan


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