Re: Value range tracing (Bill Leonard)
9 Dec 1995 19:48:47 -0500

          From comp.compilers

Related articles
[5 earlier articles]
Value range tracing (Dave Lloyd) (1995-12-09)
Re: Value range tracing (1995-12-09)
Re: Value range tracing (1995-12-09)
Value range tracing (1995-12-09)
Re: Value range tracing (John Gough) (1995-12-09)
Re: Value range tracing (Jason Patterson) (1995-12-09)
Re: Value range tracing (1995-12-09)
Re: Value range tracing (1995-12-17)
Re: Value range tracing (1995-12-17)
| List of all articles for this month |

From: (Bill Leonard)
Newsgroups: comp.compilers
Date: 9 Dec 1995 19:48:47 -0500
Organization: Harris Computer Systems, Ft. Lauderdale FL
References: 95-12-014
Keywords: analysis, optimize (Jeremy Fitzhardinge) writes:
> I'm wondering if people bother with value range tracing. That is,
> keeping track of the possible range of variables at each point in the
> program.
> Is this kind of thing useful? Is it useful enough to implement?
> This isn't very complex, so I assume people have thought about it,
> but I've seen very little literature on it.

The Harris Ada compiler does range propagation and optimizations based on
range information. We don't do it for other languages because the
perceived payoff is small. For Ada, the payoff is potentially much larger
because of all the constraint checks that Ada normally requires.

Our range propagation makes use of declarative information, of course, so
that if a variable is declared to have the range 1..10, we take that as a
given. Constraint checks inserted by the front end and user-specified
comparisons provide further information.

We use the derived range information to eliminate constraint checks,
substitute constants (if the range degenerates to a single value), and
eliminate user-specified if-tests. Eliminating the constraint checks is by
far the biggest winner -- the other possibilities don't occur nearly as

Bill Leonard
Harris Computer Systems Corporation
2101 W. Cypress Creek Road
Fort Lauderdale, FL 33309

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.