Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
OCamlJIT2 vs. OCamlJIT
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Eray Ozkural <examachine@g...>
Subject: Re: [Caml-list] OCamlJIT2 vs. OCamlJIT
On Thu, Dec 2, 2010 at 12:03 AM, Jon Harrop <> wrote:
> >
> > As does assembler, so even more reasons to emit assembler?
> LLVM makes it a *lot* easier to generate efficient code, of course.

Just like the way gcc is using a hierarchy of program representations from
high-level to low-level, an ocaml compiler could in principle perform type
and language specific optimization passes in the high-level (cmm for
instance) and then emit llvm code, without any loss of efficiency, I think.

Still, I have to agree with other posters stating that a compiler backend
written in ocaml is preferable. I agree, if not only for the reason that I
know from experience it would be 10 times easier to write in ocaml some of
the passes I have had to deal with in C++. Even working with symbols is
quite awkward in C++. While on the other hand, libraries like boost can help
at times, but it is nothing we cannot replicate in ocaml. As a compiler
developer, I would be most intrigued in profiling and static analysis
information represented in ocaml.

I don't see why hybrids are a bad idea, though. If you see LLVM becoming an
industry standard, then, of course it's worth supporting. It means you'll
target new architectures with no effort.


Eray Ozkural, PhD candidate.  Comp. Sci. Dept., Bilkent University, Ankara