[tree-ssa] alias analysis
Diego Novillo
dnovillo@redhat.com
Thu Feb 13 16:23:00 GMT 2003
On Thu, 2003-02-13 at 10:59, Daniel Berlin wrote:
> We shouldn't be having an analyzer that *only* uses PTA or *only* uses
> TBAA.
> That's silly.
> They can work in concert, as they do now.
> PTA is still used to disambiguate the aliases.
>
OK, so what I didn't understand is the model we use for PTA then. We
don't actively call may_alias_p() from the optimizers. What we do is
collect alias information before hand so that the optimizers can call
'may_aliases (var)' and get a list of all the variables that may alias
with 'var'.
Perhaps that's not a good model? When I suggested making may_alias_p
static I had that model in mind. We pre-compute all the alias
relationships before building SSA and then the optimizers can traverse
'may_aliases (var)'. If this is not a good model for doing PTA, then
let's change it.
> > I thought I had neatly separated what we do when
> > -ftree-points-to is given and when it's not. I don't know why you
> > removed it.
>
> Because it's broken that way (Jeff's changes broke it, AFAICT), and
> because it's too memory intensive if you create explicit may-alias sets
> because of global var aliasing. It's not usable that way. I've got
> figures, but they aren't pretty.
> It's not a fixable problem. We'll have to create some kind of set to
> reduce the memory requirements.
>
OK, this one is different. I'm starting to believe that we should not
model call-clobbering with a forced alias to *.GLOBAL_VAR. It seemed
like a neat trick, but it creates problems:
(1) Since *.GLOBAL_VAR aliases every type, functions that have
call-clobbered variables also have a single alias set where everything
aliases everything. Too pessimistic.
(2) As you point out, *.GLOBAL_VAR blows up together with PTA.
I've been thinking that instead of having this silly aliasing model, we
should actually insert a VDEF for every variable that may be clobbered
at a call site.
> You seem to think we don't use PTA anymore.
> This is not the case at all.
>
Right, sorry about this one. This is just me reading every other line
of a message.
Thoughts? Diego.
More information about the Gcc
mailing list