Re: standard intermediate representation for C/C++ ?

martin@CS.UCLA.EDU (david l. martin)
Thu, 7 May 1992 22:00:24 GMT

          From comp.compilers

Related articles
standard intermediate representation for C/C++ ? martin@CS.UCLA.EDU (1992-04-30)
Re: standard intermediate representation for C/C++ ? macrakis@osf.org (1992-05-05)
Re: standard intermediate representation for C/C++ ? martin@CS.UCLA.EDU (1992-05-07)
Re: standard intermediate representation for C/C++ ? sdm@cs.brown.edu (1992-05-08)
Re: standard intermediate representation for C/C++ ? root@grok19.columbiasc.NCR.COM (Dave Howell) (1992-05-11)
Re: standard intermediate representation for C/C++ ? dalamb@qucis.queensu.ca (1992-05-13)
Re: standard intermediate representation for C/C++ ? rascal@verdix.com (1992-05-14)
Re: standard intermediate representation for C/C++ ? bevan@computer-science.manchester.ac.uk (Stephen J Bevan) (1992-05-15)
Re: standard intermediate representation for C/C++ ? macrakis@osf.org (1992-05-15)
[3 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers,comp.lang.c,comp.lang.c++
From: martin@CS.UCLA.EDU (david l. martin)
Keywords: C, C++
Organization: UCLA Computer Science Department
References: 92-05-010
Date: Thu, 7 May 1992 22:00:24 GMT

Recently I posted the following:


>Is there a standard or widely accepted definition of an intermediate
>representation for ANSI C or for C++? (Or even one that's well
>documented, even thought it may not be in wide use.)
>
>By intermediate representation, I mean the sort of information which a
>compiler front-end passes to the back-end. Such a definition could
>obviously be in use by compiler builders, or could be used to pass
>information about programs between tools in an integrated environment.
>The best example I know of this is the DIANA standard for Ada.


A couple of responses have pointed me to the RTL (Register Transfer
Language) used in GNU's gcc. However, unless I completely misunderstand
RTL, it's not really an example of what I was asking for.


According to RTL documentation, RTL describes the instructions to be
output by the compiler; that is, the instruction set of a particular
machine's architecture. What I'm seeking is a description of the syntax
and semantics of the C program being compiled (which then has to be
translated into an appropriate machine language using the RTL).


Does RTL also somehow describe the syntax and semantics of C programs? If
not, how are the syntax and semantics of C programs represented in gcc, or
other compilers? Is it all terribly ad-hoc, or does it conform to any
well-documented representation format?


Any enlightening comments would be greatly appreciated.


Thanks.


- Dave Martin
[RTL is indeed what GCC uses between the parser and the code generator, but
you correctly surmise that it's much lower level than source code. If what
you really want is something to use in source tools, RTL isn't it. -John]
--


Post a followup to this message

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