This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Alias analysis - does base_alias_check still work ?
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 16 Jul 2002 20:51:20 +0200
- Subject: Alias analysis - does base_alias_check still work ?
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
L.S.,
f/com.c contains the following note, preceding the definition of
#define LANG_HOOKS_GET_ALIAS_SET hook_get_alias_set_0
/* We do not wish to use alias-set based aliasing at all. Used in the
extreme (every object with its own set, with equivalences recorded)
it
might be helpful, but there are problems when it comes to inlining.
We
get on ok with flag_argument_noalias, and alias-set aliasing does
currently limit how stack slots can be reused, which is a lose. */
I do not know if all the facts mentioned here still actually hold, but I
do have strong doubts that base_alias_check in alias.c still does its
duty.
Consider the following Fortran source:
SUBROUTINE SIMPLE(A, B)
B = 3.0
A = 2.0
B = A*B
END
one would assume that alias analysis at least once should check that the
assignment to A in line 3 doesn't change the value of B set in line 2,
which, with
flag_argument_noalias > 1
[arguments don't alias] in effect, would be the case.
However, according to my experiments with setting breakpoints in
base_alias_check, it never passes that point.
Before I go on a wholesale check to see if base_alias_check *ever*
returns anything else than `1` (x and y might alias), does someone have
a good idea to narrow the search ?
Thanks in advance,
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)