public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* intermediate code
@ 2001-11-01  0:45 Florian Hoenig
  2001-11-01  3:35 ` Rupert Wood
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Hoenig @ 2001-11-01  0:45 UTC (permalink / raw)
  To: gcc-help

Hey Guys,

I never had the time to look at gccs internals. Always been "only" using it.
What I have reckognised is, that its 2-tier. frontend for several languages
und backends fuer quite a lot of architectures. Wasn't that hard to notice
:)
But as far as I know about 2-tier compilers is, that they translate
highlevel language code to some intermediate code.
I was just wondering, why not save this code into executables like
Microsoft's IL, and do JIT compiling with the backend on a choosen
platform???

-Florian Hoenig

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: intermediate code
  2001-11-01  0:45 intermediate code Florian Hoenig
@ 2001-11-01  3:35 ` Rupert Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Rupert Wood @ 2001-11-01  3:35 UTC (permalink / raw)
  To: 'Florian Hoenig'; +Cc: gcc-help

Florian Hoenig wrote:

> What I have reckognised is, that its 2-tier. frontend for several
> languages und backends fuer quite a lot of architectures.

Three, arguably: language specific front-end, common optimization phase
('middle-end') and target-specific back-end.

> But as far as I know about 2-tier compilers is, that they translate
> highlevel language code to some intermediate code.

GCC's is called 'RTL' and is documented in the manual, e.g.

    http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_19.html

> I was just wondering, why not save this code into executables like
> Microsoft's IL, and do JIT compiling with the backend on a choosen
> platform???

There are some advantages to this, e.g. MSVC++ 7 uses an intermediate
language scheme for its 'global optimization' pass. However, there is
already target-specific knowledge in the RTL: both processor specific
(e.g. integer size) and OS specific (definitions from system headers).
It may be possible to compile for an arbitrary 32-bit absolutely-POSIX
machine, though, but this is (AFAIAA) a purely theoretical beast :-)

Furthermore, read/write of an intermediate language (or trivial
bytecode) will probably never happen. RMS is paranoid that commercial
vendors will use an intermediate language to circumvent the GPL and
'steal' GCC technology, e.g. use GCC front end to generate RTL, use
closed-source super-optimisation pass on the RTL and then use GCC
backend to write out the code.

Rup.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-11-12  7:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-01  0:45 intermediate code Florian Hoenig
2001-11-01  3:35 ` Rupert Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).