This is the mail archive of the gcc@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]

Alias analysis - does base_alias_check still work ?


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)


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