This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Value Range Propagation Pass Status
- To: John Wehle <john at feith dot com>
- Subject: Re: Value Range Propagation Pass Status
- From: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Date: Sat, 05 Feb 2000 13:10:07 +1300 (NZDT)
- Cc: m dot hayes at elec dot canterbury dot ac dot nz, gcc at gcc dot gnu dot org
- References: <200002042342.SAA25136@jwlab.FEITH.COM>
John Wehle writes:
> It's currently a little weak on determining both the min and
> max of loop variables. I.e.:
>
> int i;
>
> for (i = 0; i < 10; i++)
> subr();
>
> produces:
>
> BB 1
> reg 24
> min <integer_cst 8297f34 -2147483648> max <integer_cst 8297f98 9>
This example is not so important since we now do a reasonable job of
computing the number of iterations if the bounds are constants.
I'm more interested in cases where the bounds are not constants
but where we can glean some information about the limiting values,
eg,
assert (count < 256);
for (i = 0; i < count; i++)
subr();
Michael.