caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Erik de Castro Lopo <mle+ocaml@mega-nerd.com>
To: caml-list@inria.fr
Subject: Re: ocamlopt LLVM support (Was: [Caml-list] OCamlJIT2 vs. OCamlJIT)
Date: Mon, 6 Dec 2010 09:34:12 +1100	[thread overview]
Message-ID: <20101206093412.e2de2d5c.mle+ocaml@mega-nerd.com> (raw)
In-Reply-To: <CC528935-50A4-4A94-849B-9DAD160D46A3@googlemail.com>

Benedikt Meurer wrote:

> Using a different data representation within OCaml would indeed be
> possible, but one has to ask what it's worth?

Is it necessary to use a different data representation? What does
that buy you?

> 1. You will have to rewrite not only the compiler,

At least the compiler backend, and the new backend might require
changes in earlier stages earlier of the compiler.

> the standard
> library and the bytecode interpreter (already a massive amount of
> work),

Why?

> but you also loose compatibility with almost every existing OCaml
> library binding, since the native function interface will be different.
> That's a hell of a lot of work for many people.

Again, why?

When the GHC haskell compiler gained an LLVM backend, the LLVM project
accepted changes to allow a new GHC specific calling convention. Couldn't
the same be done for Ocaml?

> 3. The current garbage collector is mostly straight-forward because of

There is no need to use LLVM's GC if something better already exists.

> Two main areas for now: The GC interface and the exception handling.

If the Ocaml versions of these are already better than what LLVM can
provide, here is no reason to use the LLVM versions.

I'm currently working on the LLVM backend to an experimental compiler
called DDC:

    http://www.mega-nerd.com/erikd/Blog/CodeHacking/DDC/index.html

DDC had an existing C backend and its own garbage collector. For the
LLVM backend I have kept the C calling convention and the existing
GC and just used LLVM for code generation.

In my experience, LLVM has been a pleasure to work with, but the
backend is not yet far enough advanced for any speed comparisons
between the C and LLVM backend.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


  parent reply	other threads:[~2010-12-05 22:34 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-30  8:36 OCamlJIT2 vs. OCamlJIT Benedikt Meurer
2010-11-30 10:48 ` [Caml-list] " Török Edwin
2010-11-30 10:55   ` Benedikt Meurer
2010-11-30 17:01     ` bluestorm
2010-11-30 17:26       ` Török Edwin
2010-11-30 18:27         ` Basile Starynkevitch
2010-11-30 17:29       ` Benedikt Meurer
2010-11-30 17:32       ` Yoann Padioleau
2010-11-30 22:06         ` Jon Harrop
2010-11-30 22:48           ` Benedikt Meurer
2010-12-01 14:11             ` Jon Harrop
2010-12-01 15:00               ` Benedikt Meurer
2010-12-01 22:03                 ` Jon Harrop
2010-12-02  1:17                   ` Eray Ozkural
2010-12-03 10:03                   ` ocamlopt LLVM support (Was: [Caml-list] OCamlJIT2 vs. OCamlJIT) Benedikt Meurer
2010-12-03 13:34                     ` Till Varoquaux
2010-12-03 13:41                       ` Eray Ozkural
2010-12-03 14:06                         ` Török Edwin
2010-12-03 21:16                       ` Jon Harrop
2010-12-05 16:44                       ` Benedikt Meurer
2010-12-03 14:32                     ` Philippe Strauss
2010-12-03 21:22                       ` Jon Harrop
2010-12-03 21:45                         ` Philippe Strauss
2010-12-03 15:32                     ` Michael Ekstrand
2010-12-03 21:34                       ` Jon Harrop
2010-12-03 20:07                     ` Jon Harrop
2010-12-05 16:37                       ` Benedikt Meurer
2010-12-05 16:57                         ` Török Edwin
2010-12-05 20:54                           ` Benedikt Meurer
2010-12-05 20:12                         ` Jon Harrop
2010-12-05 21:21                           ` Benedikt Meurer
2010-12-05 21:44                             ` Benedikt Meurer
2010-12-06 22:38                             ` Jon Harrop
2010-12-05 22:41                           ` Erik de Castro Lopo
2010-12-05 22:34                         ` Erik de Castro Lopo [this message]
2010-12-06  8:27                           ` Benedikt Meurer
2010-12-06  9:28                             ` David Rajchenbach-Teller
2010-12-06 11:08                         ` Richard Jones
2010-12-06 20:18                           ` Jon Harrop
2010-12-01  0:16           ` [Caml-list] OCamlJIT2 vs. OCamlJIT Erik de Castro Lopo
2010-12-01  1:34             ` Yoann Padioleau
2010-12-01 12:58             ` Jon Harrop
2010-12-01 13:55               ` ivan chollet
2010-11-30 21:19       ` Jon Harrop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101206093412.e2de2d5c.mle+ocaml@mega-nerd.com \
    --to=mle+ocaml@mega-nerd.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).