Re: Intermediate forms (again?): worthwhile?

Robbert Haarman <comp.compilers@inglorion.net>
Wed, 19 Jan 2011 09:46:26 +0100

          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)
[11 later articles]
| List of all articles for this month |

From: Robbert Haarman <comp.compilers@inglorion.net>
Newsgroups: comp.compilers
Date: Wed, 19 Jan 2011 09:46:26 +0100
Organization: Wanadoo
References: 11-01-045 11-01-047 11-01-082
Keywords: analysis, code

Hi Tony,


> Everytime I look into some intermediate LANGUAGE, I feel I am getting too
> 3rd-party proprietary so I may as well just emit the assembly language
> and forego the IL. That or invent my own based upon quadruples or
> something.


> Writing to the hardware (assembly language) gives me the warm
> fuzzies about being a safe thing to do. i.e., Intel x86 is much the
> commodity whereas ILs are esoteric.


It depends on what you want to achieve. x86 has been around for a long time,
is still widely used, and will be provided for compatibility for yet more
time. On the other hand, recognize that we don't actually hardly do 8086
anymore; it's more 386 or even 686 these days, and we're in the middle of
a transition to AMD64, which, like 8086 vs 386, is similar, but not actually
the same.


In the meantime, mobile phones are getting hotter and hotter as
a platform, and are mostly based on ARM. Also, calling conventions (and
therefore the assembly you would need to generate) differ depending on
operating system (e.g. Windows uses different conventions from everyone else
on AMD64).


So, if you generate assembly, you will either have to content yourself with
supporting only one instruction set / calling convention combination, or you
will have to do extra work for every additional combination you want to
support.


As you state, you would rather not have to spend time on the back end at
all, and just focus on the front end. I understand this sentiment and I
think it is the way it _should_ be. Your great innovations are going to
be in the front end; code generation is or at least should be a solved
problem. So it sounds like linking in a library to do all the back end
plumbing for you is exactly what you want.


> 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.
> [The usual suggestion these days is LLVM. -John]


John is right. And I wonder what your experiences with LLVM have been,
that have made you decide it wasn't what you were looking for. Also, I
would like to invite you to take a look at Voodoo and tell me what you
think. Voodoo _is_ that slightly higher level than assembly black box
supporting multiple platforms, or at least that's what I mean for it to
be. If you could tell me what you think about it, and what might be
improved to make it more useful to you, that would be a great help to
me. You can read about Voodoo at
http://inglorion.net/documents/designs/voodoo/


Kind regards,


Bob



Post a followup to this message

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