From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Toon Moene Cc: craig@jcb-sc.com, egcs@egcs.cygnus.com Subject: Re: f77 vs type based alias analysis Date: Wed, 30 Jun 1999 15:43:00 -0000 Message-ID: <2838.928735663@upchuck.cygnus.com> References: <37591A00.ACE54339@moene.indiv.nluug.nl> X-SW-Source: 1999-06n/msg00244.html Message-ID: <19990630154300.6aFAmdOrm8TNRxvxqi8DiofRm-3rqjoAhW3mk53KAKQ@z> 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