f77 vs type based alias analysis

Jeffrey A Law law@cygnus.com
Wed Jun 30 15:43:00 GMT 1999


Note, we've got two threads in this message (my fault actually)...  I'll
split for Fortran thread off from the main aliasing thread.

  In message < 37591A00.ACE54339@moene.indiv.nluug.nl >you write:
  > This was suggested, but I replied that I didn't believe that to be the
  > reason.  Note that Fortran basically only has one "scope" for automatic
  > variables (whether arrays or scalars):  The complete subprogram (i.e.
  > subroutine or function).
  > 
  > That means that in the scope Mark's alias analysis works in, automatic
  > arrays are created precisely once (at the beginning of that scope) and
  > destroyed exactly once (at the end of said scope); hence, there is no
  > opportunity to re-use stack slots.
Hmmm.  Well, there's a reasonably easy way to verify if it is the stack
slot issue.

Replace "flag_strict_aliasing" with "0" in function.c and benchmark against
the unmodified version of the compiler.

That allows us to isolate the slot combination/reuse issues from the rest of
the strict aliasing changes.  While there is the slight chance you'll get wrong
code, I doubt it'll happen in practice with Fortran.  And at this point we're
just trying to find out why the code is slower when strict aliasing is enable,
so 100% correctness isn't needed.


jeff

 



More information about the Gcc mailing list