Re: Intermediate forms (again?): worthwhile?

"Tony" <nospam@myisp.net>
Wed, 19 Jan 2011 06:55:42 -0600

          From comp.compilers

Related articles
Intermediate forms (again?): worthwhile? nospam@myisp.net (Tony) (2011-01-13)
Re: Intermediate forms (again?): worthwhile? cr88192@hotmail.com (BGB) (2011-01-14)
Re: Intermediate forms (again?): worthwhile? comp.compilers@inglorion.net (Robbert Haarman) (2011-01-14)
Re: Intermediate forms (again?): worthwhile? gene.ressler@gmail.com (Gene) (2011-01-15)
Re: Intermediate forms (again?): worthwhile? nospam@myisp.net (Tony) (2011-01-18)
Re: Intermediate forms (again?): worthwhile? comp.compilers@inglorion.net (Robbert Haarman) (2011-01-19)
Re: Intermediate forms (again?): worthwhile? steshaw@gmail.com (Steven Shaw) (2011-01-19)
Re: Intermediate forms (again?): worthwhile? nospam@myisp.net (Tony) (2011-01-19)
Re: Intermediate forms (again?): worthwhile? nospam@myisp.net (Tony) (2011-01-19)
Re: Intermediate forms (again?): worthwhile? nospam@myisp.net (Tony) (2011-01-19)
Re: Intermediate forms (again?): worthwhile? cr88192@hotmail.com (BGB) (2011-01-19)
Re: Intermediate forms (again?): worthwhile? cr88192@hotmail.com (BGB) (2011-01-22)
Re: Intermediate forms (again?): worthwhile? ehog.hedge@googlemail.com (chris dollin) (2011-01-22)
Re: Intermediate forms (again?): worthwhile? nospam@myisp.net (Tony) (2011-01-22)
[9 later articles]
| List of all articles for this month |
From: "Tony" <nospam@myisp.net>
Newsgroups: comp.compilers
Date: Wed, 19 Jan 2011 06:55:42 -0600
Organization: TeraNews.com
References: 11-01-045 11-01-047 11-01-082
Keywords: code
Posted-Date: 19 Jan 2011 11:03:40 EST

Tony wrote:


> Something just a tad higher level than assembly and a bit more regular
> would be nice, but so far, I haven't seen anything I'd want to commit
> to. Surely if I could just concentrate on the compiler front end and
> attach it to a back end black box supporting multiple platforms, that
> would be great.


Mod said:


> [The usual suggestion these days is LLVM. -John]


Maybe I just need to "grow into it". My first proof-of-concept
implementation will be "walk the AST and generate x86-32 assembly",
the AST being the intermediate form. I believe MS is readying it's AST
to become prominent and available via APIs (if that strategy hasn't
changed by now, as I read that years ago).


I can categorize and comment on the 4 IRs I know of now (note that
cross-platform targeting is not necessarily a requirement):


      1. Assembly Language: write to one HW architecture and translate from
that to all others.
      2. GCC, LLVM: proprietary instruction stream, but inherently
cross-platform.
      3. C--, VooDoo: intermediate LANGUAGE.
      4. C: intermediate language only suitable for C-like derivative
languages.


(1) is nice because it does not introduce a 3rd party, esoteric step,
save for the assembler.
(2) GCC is nice because it allows "instant" availability on a number of
platforms, but the big drawback is GPL.
(3) is probably better than C for non-C-like languages, but suffers from
the ubiquitousness of something C and THAT is pretty much all of what
makes a LANGUAGE IR lucrative.
(4) Ubiquitousness across all platforms but limits to C-derivative
languages.


For my project, C and GCC are immediately dismissed as unappropriate, for
separate reasons. LLVM will get another look after I do (1). I find (3)
harder to grok than (1) so I have no plans to visit them in the future.



Post a followup to this message

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