Article View: gnu.gcc.help
Article #53041gcc useful to compiler writers?
From: Richard Stallman
Date: Sat, 21 Mar 1992 18:52
Date: Sat, 21 Mar 1992 18:52
27 lines
1915 bytes
1915 bytes
Perhaps there is a way for a compiler writer to generate
machine-independent pseudo assembly code of some sort used by gcc
in an intermediate stage, and feed it to the tail end of gcc.
There is no way to do this, because GCC was designed with a different
idea in mind.
The idea of the GCC design is that front ends generate a tree data
structure which is convenient for front ends to produce. A front end
should not have to go to the trouble of producing anything at the
level of assembler code.
The tree data structure is nearly independent of the target machine;
it depends only on a few parameters of storage layout. The only
assembler-level data structure in GCC is RTL, and valid RTL is very
dependent on the specific target machine. This is another reason why
it is best for front ends to produce the tree structure.
A compiler that worked by generating low-level intermediate code
and reading it back would also run more slowly.
Aside from the technical issues, there is another reason why it is not
good to split the compiler into two pieces. Right now, anyone who
makes a front end for GCC has to make it free. It is best for the
whole community if that remains true. For this reason, I wouldn't
support a change that would disconnect the front end from the rest of
GCC.
Technical Details
Message-ID:
<9203220452.AA29767@mole.gnu.ai.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!rmsReferences:
<1992Mar22.040759.14777@ux1.cso.uiuc.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,b4018ad960b71453 X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-03-22 19:53:41 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!rms From: rms@gnu.ai.mit.edu (Richard Stallman) Subject: gcc useful to compiler writers? Message-ID: <9203220452.AA29767@mole.gnu.ai.mit.edu> Sender: daemon@cis.ohio-state.edu Organization: GNUs Not Usenet References: <1992Mar22.040759.14777@ux1.cso.uiuc.edu> Distribution: gnu Date: Sat, 21 Mar 1992 18:52:12 GMT Lines: 28