This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Implement the easy part of -fargument-noalias-global
On Apr 7, 2005 12:15 AM, Andrew Pinski <pinskia@physics.uc.edu> wrote:
>
> On Apr 6, 2005, at 5:58 PM, Andrew Pinski wrote:
>
> > The following patch implements the easiest part of
> > -fargument-noalias-global,
> > which we can represent in the current tree aliasing infrastructure.
>
> Just a note. With this patch, we are able to optimize the following
> fortran
> function on the tree level:
> MODULE random_standard_normal_mod
> implicit none
> real*8 sum
> contains
> subroutine sum1 (a, n)
> real*8 a(n)
> integer i,n
> sum = 0
> do i = 1, n
> sum = sum + a (i)
> end do
> end subroutine
> end MODULE
Nice. Though only a lazy Fortran77 programmer would produce the above
in Fortran90 :) I'd expect old Fortran77 programs with lots of common section
use to benefit the most -- variables in common blocks are treated the same
as globals wrt aliasing, no?
Thanks for this,
Richard.