Re: Value range tracing

bill@amber.ssd.hcsc.com (Bill Leonard)
9 Dec 1995 19:48:47 -0500

          From comp.compilers

Related articles
[5 earlier articles]
Value range tracing dave@occl-cam.demon.co.uk (Dave Lloyd) (1995-12-09)
Re: Value range tracing bernecky@eecg.toronto.edu (1995-12-09)
Re: Value range tracing creusil@cri.ensmp.fr (1995-12-09)
Value range tracing deaeni@auto-trol.com (1995-12-09)
Re: Value range tracing gough@dstc.qut.edu.au (John Gough) (1995-12-09)
Re: Value range tracing jason@reflections.com.au (Jason Patterson) (1995-12-09)
Re: Value range tracing bill@amber.ssd.hcsc.com (1995-12-09)
Re: Value range tracing vadik@cs.umd.edu (1995-12-17)
Re: Value range tracing mab@wdl.loral.com (1995-12-17)
| List of all articles for this month |

From: bill@amber.ssd.hcsc.com (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@suede.sw.oz.au (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
often.


--
Bill Leonard
Harris Computer Systems Corporation
2101 W. Cypress Creek Road
Fort Lauderdale, FL 33309
Bill.Leonard@mail.hcsc.com
--


Post a followup to this message

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