This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Value Range Propagation Patch (Version 3)
- To: John Wehle <john at feith dot com>
- Subject: Re: Value Range Propagation Patch (Version 3)
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Mon, 10 Jul 2000 23:53:32 +0200
- CC: gcc-patches at gcc dot gnu dot org
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <200007101822.OAA02470@jwlab.FEITH.COM>
John Wehle wrote:
> I wrote:
> > Or is the VRP code unable to determine the range of the biv I ?
>
> Yes. There are two reasons for this.
>
> 1) I didn't implement the code to compute the min and max for loop
> counters until after I posted version 3. Attached is the current
> (rather untested) version of vrp.c which when given:
[ ... example elided - the code bootstrapped correctly, btw, on
alphaev6-unknown-linux-gnu ... ]
> is able to remove the call to abort. And given your example code it
> does determines that the loop counter ranges from 0 to 9.
Yep, unfortunately, in Fortran as implemented in the current frontend, I
isn't the loop counter. The loop counter is an abstract thingy that for
a loop:
DO I = N1, N2, N3 ! Loop from N1 to N2 with step N3
....
ENDDO
runs from MAX(N2 - N1 + N3) / N3, 0) to zero, while I runs from N1 to N1
+ (MAX(N2 - N1 + N3) / N3, 0) - 1) * N3. Perhaps that's just too much
to ask from VRP.
Thanks for the explanation.
--
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)