On compilation Re: [plt-scheme] 301.4
--- Matthew Flatt <mflatt at cs.utah.edu> wrote:
> MzScheme (non-3m) now includes a just-in-time native-code
> compiler for i386 and PowerPC.
...
> For now, typical speedups from JIT compilation are in the
> range 1x (i.e., no speedup) to 1.3x
This is nice to see, though the performance isn't very
impressive. I assume the intended replacement is Larceny.
I see two problems with the current JIT:
- GNU Lightening doesn't generate very good code
- too much useful information has been lost by the time
the bytecode level is reached
Has anyone considered LLVM as a backend? I'm quite
impressed with how the project has progressed. Latest
versions support tail calls, there is SIMD support, and the
developers have done a good job packaging and documenting
the project (which was never done for MLRISC, the nearest
equivalent I know of). Oh, and the lead dev has been hired
by Apple and it looks like GCC and/or Apple versions
thereof will fold in LLVM in the future.
LLVM is a better target than C for a compiler, as the
intermediate representation is more expressive. It is a
better target than Lightening, as it generates better code
while still supporting JIT compilation (at least on x86).
It's a great target for a functional language, as the
intermediate representation - static single assignment
(SSA) - is a functional language. A-normal form = SSA.
I'm not sure there really is a point to this email, other
than to suggest the compiler developers look at LLVM. Had
I the time, I investigate myself. I've got as far as
compiling LLVM -- so far that's the one downside of the
project - it takes a whole day to compile on my machine.
N.
Email: noelwelsh <at> yahoo <dot> com noel <at> untyped <dot> com
AIM: noelhwelsh
Blogs: http://monospaced.blogspot.com/ http://www.untyped.com/untyping/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com