This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Value Range Propagation Pass Status


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]