Value Range Propagation Pass Status

John Wehle john@feith.com
Fri Feb 4 18:01:00 GMT 2000


> 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();

Same problem.  Specifically:

  void
  func(int a)
    {
    int count;
    int i;

    count = a;

    if (count >= 256)
      return;
    for (i = 0; i < count; i++)
      subr();
    }

results in:

BB 2
    reg 26
        min <integer_cst 82984cc -2147483648>     max <integer_cst 8298530 254>

where BB 2 is the top of the loop and reg 26 is i.  The problem is likely
to be solved once I find some time. :-)  In which case the bounds will be
known for both constants and variables with known limiting values.

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------



More information about the Gcc mailing list