[Bug fortran/31593] Invariant DO loop variables and subroutines

Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de> gcc-bugzilla@gcc.gnu.org
Wed Aug 12 18:11:00 GMT 2009



------- Comment #7 from =?ISO-8859-1?Q?Tobias_Schl=FCter?=
 <tobias dot schlueter at physik dot uni-muenchen dot de>  2009-08-12 18:11 -------
Subject: Re:  Invariant DO loop variables and subroutines

tkoenig at gcc dot gnu dot org wrote:
> ------- Comment #6 from tkoenig at gcc dot gnu dot org  2009-08-12 17:53 -------
> We get a dramatic speedup when enclosing the arguments to
> print in parentheses:
> 
> This is something we can do for
> 
> - write and print statements
> - intent(in) arguments
> - any do variable passed as an argument within the loop

An interesting approach.  As long as you don't print array slices in the 
loops this should work around the escaping pointer problem.  It comes at 
the risk of creating excessive copies.

Actually, perhaps the right way of achieving this is not to add 
OP_PARENTHESES in the frontend, but to do a copy when creating the call.

Cheers,
- Tobi


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31593



More information about the Gcc-bugs mailing list