Pros and cons of high-level intermediate languages

ssp@csl36h.csl.ncsu.edu (Santosh Pande)
Mon, 20 Jul 1992 19:48:52 GMT

          From comp.compilers

Related articles
Pros and cons of high-level intermediate languages ssp@csl36h.csl.ncsu.edu (1992-07-20)
Re: Pros and cons of high-level intermediate languages boehm@parc.xerox.com (1992-07-21)
Re: Pros and cons of high-level intermediate languages chased@rbbb.Eng.Sun.COM (1992-07-21)
Re: Pros and cons of high-level intermediate languages bbx!bbx.basis.com!scott@unmvax.cs.unm.edu (1992-07-22)
Re: Pros and cons of high-level intermediate languages shankar@sgi.com (1992-07-23)
Re: Pros and cons of high-level intermediate languages Olivier.Ridoux@irisa.fr (1992-07-23)
Re: Pros and cons of high-level intermediate languages fjh@munta.cs.mu.OZ.AU (1992-07-23)
[27 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: ssp@csl36h.csl.ncsu.edu (Santosh Pande)
Organization: Compilers Central
Date: Mon, 20 Jul 1992 19:48:52 GMT
Keywords: translator, design

Hi,
I am interested in knowing the pros and cons of using an
intermediate language (IL) in general. In particular I find 'C' has been
used extensively as the IL in many situations: Modula, SISAL, AT&T Cfront
for C++ etc.


Some of the reasons I can see in favor of such an approach are:
(1) Ease of portability (a feature of C that made it so popular!),
(2) Easy retargettability (one can patch the run-time support with a
customized library for the given target architecture easily), and,
(3) Relative ease of mapping a given intermediate form (IF) to C's
data structures.


However, such an approach might also suffer from:


(1) Debugging is hellish,
(2) Efficiency is dictated to a large degree by the target C
Compiler,
(3) Translation in some situations might involve clumsy data
structures and thus loss of efficiency.


The second reason is especially important because the many C
Compilers seem to suffer from the tough problems of aliases and side
effects in interprocedural analysis (except in some cases).


Now my questions:
(1) I am looking for examples in which using C as IL will lead to
inefficiencies,
(2) I want to know whether any other language has been used as
extensively as C for IL,
(3) I want to learn about the efforts to evolve efficient ILs
(just like IFs) for procedural languages.


Thank you.
--
  Santosh Pande,
  Box. 7911,
  Computer Systems Laboratory,
  Dept. Of Electrical & Computer Engg.
  North Carolina State University, Raleigh,
  NC-27695-7911
[In answer to question 2, I expect that there are a lot more langauges
that use Fortran as intermediate code than ones that use C. Fortran has
been around longer and lets you do lots of gross low level hacks that you
always seem to want in intermediate code. -John]
--


Post a followup to this message

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