From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pB9E5rbM015333 for ; Fri, 9 Dec 2011 15:05:53 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhEBAEcV4k7RVdY2kGdsb2JhbABDqnEIIgEBAQEJCQ0HFAQhgXIBAQEDARICLAEBNwEECws0EjQBBQEcBjWHZQIGmSUKijOEHAGOCgMEiw9jomU9g3o X-IronPort-AV: E=Sophos;i="4.71,326,1320620400"; d="scan'208";a="122754876" Received: from mail-bw0-f54.google.com ([209.85.214.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 09 Dec 2011 15:05:47 +0100 Received: by bkbzv15 with SMTP id zv15so4989660bkb.27 for ; Fri, 09 Dec 2011 06:05:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=cKorxh2elyI/nERZ4fftOZKD9sp6rsvMQxRZkhuKtxY=; b=ax9VIqwo/kR2yyuld6pCQaqI+XQw7IpkDqn1G2xzgqohCr4sL4elM2e1O0wRZZxIUa cwqLEJTbw8B3YhKyVxHtpPfxGCZ8671+5wRY+cz/F7HaHDJxag7YVTPx0IDyh6RW8+tI z/armxbxH4HrJ2chJ1qZAv3jHmBig57jBA0r0= Received: by 10.204.130.85 with SMTP id r21mr3769717bks.38.1323439547389; Fri, 09 Dec 2011 06:05:47 -0800 (PST) Received: from coruscant.kosmos.all (ip-95-223-170-32.unitymediagroup.de. [95.223.170.32]) by mx.google.com with ESMTPS id cc2sm10051902bkb.8.2011.12.09.06.05.45 (version=SSLv3 cipher=OTHER); Fri, 09 Dec 2011 06:05:46 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 From: Benedikt Meurer In-Reply-To: Date: Fri, 9 Dec 2011 15:05:43 +0100 Cc: =?iso-8859-1?Q?St=E9phane_Glondu?= , oleg@okmij.org, caml-list@inria.fr, ontologiae@gmail.com, caml@inria.fr Message-Id: <59A74C55-C12B-4C98-9496-2E83BE8A39F0@googlemail.com> References: <20111209065758.94306.qmail@eeoth.pair.com> <4EE1BE59.4020804@glondu.net> To: Gabriel Scherer X-Mailer: Apple Mail (2.1251.1) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id pB9E5rbM015333 Subject: Re: [Caml-list] Why NOT to compile OCaml via C On Dec 9, 2011, at 13:37 , Gabriel Scherer wrote: >> You can follow the progress here: https://github.com/colinbenner/ocamlllvm > > - there are two different repos, ocamlllvm and ocaml-llvm (which has a > commit history that make it looks like it is where the real > development happen); which one should one follow? A wild guess after > only a quick look is that the ocaml-llvm repo did not build upon your > ocamlnat changes, and ocamllvm is about merging the changes on top of > it; but I really have no idea. ocaml-llvm was the initial attempt, based on the upstream OCaml sources. But we decided to ditch the surrounding OCaml stuff, esp. the broken make-based build system in favor of something simple, based on oasis and ocamlbuild (just like I did with ocamlnat). So the one to follow is ocamlllvm. > - you mention a "patched" LLVM; where can the patches be fetched? Just drop Colin a mail and ask him for the current patch (should be for 2.7 or 2.8, IIRC). > Do > you plan to present changes in such a way that it can be submitted > upstream? Yes, the long time goal (maybe impossible to reach with just one bachelor thesis) is to have a simple set of patches for LLVM (mostly calling conventions, maybe some additional intrinsics for the weird OCaml exception model), which can be merged upstream. > I think it is natural that you have to make changes to LLVM, > the GHC people (which now have an experimental LLVM backend) also did, > and I was under the impression that the LLVM people where quite > welcoming of their changes, they are glad to see LLVM being used in a > non-Clang-centric project. I think your patches could bring value to > LLVM, independently of the success of the ambitious ocaml backend > attempt. Hm, I'm not sure. It's really easy to generate LLVM code for OCaml in general, the problem is getting things to interact with legacy OCaml code, with exception handling being one of the most important issue. The required stuff will be very platform specific and very specific to OCaml, and we don't even know if it's going to work. Benedikt