possible gcse failure: not able to eliminate redundant loads
Toon Moene
toon@moene.indiv.nluug.nl
Fri Dec 13 13:10:00 GMT 2002
Richard Henderson wrote:
> On Fri, Dec 13, 2002 at 11:26:34AM +0530, Sanjiv Kumar Gupta, Noida wrote:
>
>> b[2] = a[1];
>> for (j = 0; j < i; j++)
>> {
>> if (i)
>> b[3] = a[1];
> Yes, this requires more knowledge than is present in loop.
>
> Ignoring the first statement, we cannot hoist a[1] because
> it is only conditionally executed and might trap.
Duh ;-) Can we disable this notion of loads-that-might-trap from a frontend ?
I cannot imagine a valid Fortran program that contains an access to memory that
"might trap".
[ Silly things to do with your computer on a rainy Sunday afternoon:
1. Stand out in the rain.
- with apologies to Monty Python ]
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
More information about the Gcc
mailing list