Re: Why RTL for GCC ?

Michael K. Gschwind <>
Thu, 15 Nov 90 15:01:10 +0100

          From comp.compilers

Related articles
Why RTL for GCC ? (1990-11-12)
Re: Why RTL for GCC ? (1990-11-14)
Re: Why RTL for GCC ? (Michael K. Gschwind) (1990-11-15)
Re: Why RTL for GCC ? (1990-11-17)
| List of all articles for this month |

Newsgroups: comp.compilers,
From: Michael K. Gschwind <>
Keywords: GCC, RTL, optimize
Organization: Vienna University of Technology, AUSTRIA
References: <>
Date: Thu, 15 Nov 90 15:01:10 +0100

In article <> (david pressley) writes:
> 1) Why was the GNU C compiler implemented using RTL (Register
> Transfer Language) as opposed to 4-tuples or quads?

I think the technical reason is the `combine' pass, which can generate
arbitrarily complex RTLs. If you allow 4-tuples with 4-tuples as args,
it would probably be quite similar to RTL. I guess they would actually
be the same, apart from syntax ;-)

> 2) Is there an interpreter or simulator available for RTL?
Somebody is working on it. The idea is also mentioned in
IDEAS (or TO-DO) in the g++ distribution.

> 4) What would have to be added to quads to accomplish what is done with
> RTL?

Nesting of quads (?)

>[The simple answer to 1) is that GCC is based on an earlier compiler that
>used RTL, but I don't know the original motivation. Perhaps it appeared
>easier to retarget. -John]

I think GCC was NOT derived from a compiler, but from a machine code
optimizer written at the U. of Arizona. It's more natural to map
machine instructions to RTL than quads.


Michael K. Gschwind, Institute for VLSI-Design, Vienna University of Technology
Voice: (++43).1.58801 8144
Fax: (++43).1.569697
[I have heard that GCC also derives from a Pascal compiler done at Livermore,
but perhaps someone who knows could tell us where it really came from. -John]

Post a followup to this message

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