[tree-ssa] alias analysis
law@redhat.com
law@redhat.com
Tue Feb 11 17:29:00 GMT 2003
I've finally wrapped my head around how your scheme speeds up alias
analysis and it's not going to be trivial to merge your ideas with
mine for separating loads and stores, though it may be possible.
Your scheme depends on having every object which has the same alias set
being represented by a single tag. Then you just need to check things
against that representative tag.
In my scheme for separating loads and stores, we can have different
tags for stores to addressable objects with the same underlying tag.
ie
int x = 5;
int y = 10;
foo (&x, &y);
We'd have distinct tags for x & y, even though they have the same alias
set.
This is important when we check aliased loads -- we have to look through
*all* the tags rather than quitting when we find a alias. The number of
tags is proportional to the number of stores to unique addressable variables
and the number of pointer stores using unique alias sets.
FWIW, this scheme completes my components of cc1 test in 698 seconds. Note
I haven't really tested this scheme thoroughly, so it may have bugs
which could affect the timing.
Another approach is to go ahead and assume that X & Y may alias each
other so that they're globbed into a single alias set. This scheme will
lead to less accurate information, but does play reasonably well with
your approach. This scheme completes my components of cc1 test in 701
seconds. This scheme has been beat on pretty good.
Compare that to the current state of the branch which clocks in at 708
seconds and produces less accurate information than either of the approaches
mentioned above.
I haven't compared the two schemes to see in general how they perform
in terms of disambiguating memory references, but they both manage to
disambiguate all the memory references in 20001226-1.c.
Jeff
More information about the Gcc
mailing list