Re: intermediate representation

tarvydas@turing.toronto.edu (Paul Tarvydas)
Mon, 4 Mar 91 10:31:22 EST

          From comp.compilers

Related articles
[21 earlier articles]
Re: Intermediate Representation ok@goanna.cs.rmit.OZ.AU (1990-08-20)
intermediate representation han@cs.rochester.edu (1991-02-20)
Re: intermediate representation lavinus@csgrad.cs.vt.edu (1991-02-22)
Re: intermediate representation mike@vlsivie.tuwien.ac.at (1991-02-23)
Re: intermediate representation rfg@ncd.com (1991-02-26)
Re: intermediate representation megatest!djones@decwrl.dec.com (1991-02-27)
Re: intermediate representation tarvydas@turing.toronto.edu (1991-03-04)
| List of all articles for this month |

Newsgroups: comp.compilers
From: tarvydas@turing.toronto.edu (Paul Tarvydas)
Keywords: optimize, design, analysis
Organization: Compilers Central
References: <9102210223.AA15327@cyan.cs.rochester.edu> <4106@lupine.NCD.COM>
Date: Mon, 4 Mar 91 10:31:22 EST

A good basis for any intermediate language is described in:


R.C. Holt, "Data Descriptors: A Compile-Time Model of Data and
Addressing", ACM TOPLAS, vol. 9, no. 3 (July 1987), 367-389.


The representation gives you a way to uniformly describe all run-time data
at compile time - this includes memory locations, registers, manifest
constants, etc.


You get many of the local optimizations, such as address mode arithmetic,
constant folding and manifest subscripting, etc, almost "for free" when
you use this representation.


The representation is very clean and simple to work with, so your project
can pushed quite a long ways before it starts to quake with complexity.


There are a number of theses and papers dealing with compilers built on
top of this technology, most notably


J.R.Cordy and R.C.Holt, "Code Generation Using an Orthogonal
Model", Software Practice and Experience, vol. 20, no. 3,
March 1990, pp 301-320.


which describes a declarative tree- and menu-driven method for emitting
code and building coder-compilers (eg. like Graham-Glanville and
Davidson/Fraser/Wendt). The code generation algorithms are the simplest
I've seen (and that includes Small-C :-), yet they produce very good code.
The simplicity of this method makes it ripe for picking and extending.
(I've used this work in industry for a few years now and have had very
favourable results).


You might also be interested in Peter James Ashwood-Smith's MSc thesis,
"The Source Level Optimization of Turing Plus", March 7, 1987, at the
University of Toronto's CSRI, which applies global optimizations to a
compiler built with Data Descriptors and S/SL (a compiler-building tool -
see R.C. Holt, J.R. Cordy and D.B. Wortman, "An Introduction to S/SL:
Syntax/Semantic Language", ACM TOPLAS, vol. 4, no. 2 (April 82),
149-178).


If you are interested in more papers in this area, I'd be glad to supply
more pointers.


Paul Tarvydas
TS CONTROLS
5 Bowness Court
Etobicoke, Ont.
Canada
M9B 5Z8


tel: (416)-234-0889, fax: (416)-234-9193
uucp: tarvydas@tsctrl, on-failure: tarvydas@turing.toronto.edu
--


Post a followup to this message

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