Patch to improve shadowing of loop variables

Toon Moene toon@moene.indiv.nluug.nl
Sun Aug 6 10:03:00 GMT 2000


Jeffrey A Law wrote:
> 
>   In message <14725.22572.367595.409876@paradise.net.nz>you write:
>   > This patch improves the generated code for loops using a global
>   > variable as an induction variable so that it is comparable with code
>   > generated when an automatic variable is used as the induction
>   > variable.  (Personally I abhor using global variables, especially for
>   > induction variables, but it's amazing what some folks do....)
> BTW, the new code triggers a half-dozen or so times compiling the
> C front-end :-)  Yup, it's amazing what people do...

Hmmm, I'd hoped that it would improve induction variable strength
reduction and elimination for Fortran code that has to be translated
with -fno-automatic (which makes all local variables static).

Apparently, it doesn't help in these cases (tested with a benchmark code
that takes 25-26 seconds normally and 41-43 seconds with -fno-automatic
- no discernable change).

Oh well, one more opportunity to point people towards writing Standard
Conforming Code :-)

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


More information about the Gcc-patches mailing list