On Thu, Dec 2, 2010 at 12:03 AM, Jon Harrop < jonathandeanharrop@googlemail.com> 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. Best, -- Eray Ozkural, PhD candidate. Comp. Sci. Dept., Bilkent University, Ankara http://groups.yahoo.com/group/ai-philosophy http://myspace.com/arizanesil http://myspace.com/malfunct