Value Range Propagation Pass Status

Michael Hayes m.hayes@elec.canterbury.ac.nz
Fri Feb 4 16:10:00 GMT 2000


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.


More information about the Gcc mailing list