Value Range Propagation Patch -- Part 2 of 2

John Wehle john@feith.com
Tue May 9 14:19:00 GMT 2000


> I haven't thought about value-range propagation in any significant way, but
> I think you can get the code you desire by starting with the most optimistic
> solution and iterate until you reach a steady state.

The current approach of ordering the basic blocks also seems to produce
the desired code though the routine which does the ordering can probably
be improved.

> I believe Muchnick cover the minimal/maxmimal solution question in a reasonable
> way, the dragon book might too, but I don't remember offhand.
> 
> Another approach would be to look at the concepts for conditional constant
> propagation; I believe some of the ideas apply to your example.

I appreciate the suggestions.  I am curious if you have a specific object
to the current approach, or if you consider it unacceptable.  I imagine
the following concerns:

  Correctness

    Does it generate correct code?

  Scaling

    Does it handle large, complex CFGs in a reasonable fashion?

  Optimal

    Does it produce the best solution?

I believe that the current approach produces correct (modulus bugs :-)
and reasonably useful solutions (ignoring the fact that it currently
doesn't produce the optimal min and max values for simple loop modified
variables which is on my list of things to do).  I haven't look at any
of Brad's examples, however I will in order to see how it handles large,
complex CFGs.

What do you see as things which need to happen in order for this to be
a useful addition to GCC?

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



More information about the Gcc-patches mailing list