From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p7QIXbVX009582 for ; Fri, 26 Aug 2011 20:33:40 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkBAMTlV07RVdg2kGdsb2JhbABDhEyUQIcIAYgICBQBAQEBCQkNBxQEIYFAAQEBAQIBEgIPHQEbEgwDAQsGBQQHGh0CAiIBEQEFARwZIodQBJ0eCot7QIJVhSs7iG0CAwaFNYERBJMajF88g2c X-IronPort-AV: E=Sophos;i="4.68,286,1312149600"; d="scan'208";a="117322704" Received: from mail-qw0-f54.google.com ([209.85.216.54]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 26 Aug 2011 20:33:40 +0200 Received: by qwc9 with SMTP id 9so3836968qwc.27 for ; Fri, 26 Aug 2011 11:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=q6rTK1YNz6dV7p+UY29lSDyXy+9KlHzrLVyrDxjHBXk=; b=kibCEixvhjoyV5JtzSRFnbTWUJ+shVcHTZn/0o9LZnmfS2cO8ASHnSH05WS9XnXbRC RvpSKM7Y5RRFiwxJ9Es6P7PxwQ7eVL+38PbvEScEdFJqDB6Ft6uhbN/t4URALwElJ/qc lvTCscGit6d2pJOX8qoniDsXcF7pZcNgmQtH0= MIME-Version: 1.0 Received: by 10.229.2.23 with SMTP id 23mr1839882qch.253.1314383618133; Fri, 26 Aug 2011 11:33:38 -0700 (PDT) Received: by 10.229.191.82 with HTTP; Fri, 26 Aug 2011 11:33:37 -0700 (PDT) Received: by 10.229.191.82 with HTTP; Fri, 26 Aug 2011 11:33:37 -0700 (PDT) In-Reply-To: References: <93199F3B-E9CF-4D93-9B2B-BAAB03F4FC08@googlemail.com> <4EF51F29-D437-4F6F-9C91-DBEA3D4C3EB8@googlemail.com> <1314218451.3496.42.camel@thinkpad> <11577B43-4270-4BA4-AA77-7FDEFB4B563B@googlemail.com> <1314267668.3496.62.camel@thinkpad> <20110826222943.1e28a3c110f9da2a871db261@mega-nerd.com> Date: Fri, 26 Aug 2011 20:33:37 +0200 Message-ID: From: Pierre-Alexandre Voye To: caml-list@inria.fr Content-Type: multipart/alternative; boundary=001485394142a84fed04ab6cc823 Subject: Re: [Caml-list] Linear Scan Register Allocator for ocamlopt/ocamlnat --001485394142a84fed04ab6cc823 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Note that the ocaml compiler has a flag -cmm which outputs C-- ast code. F. Reig made a c-- ocaml backend during his thesis. Including a GC. Unhappily, sources code haven't been released. But it proves it works. Le 26 ao=C3=BBt 2011 14:30, "Erik de Castro Lopo" = a =C3=A9crit : Pierre-Alexandre Voye wrote: > I have a stupid question : I wonder if it would not be a bad idea th... I have some experience in thie area. I work on the DDC compiler [0] a compiler for a strict by default (optionally lazy) evaluation dialect of Haskell. When I joined the project the compiler had a working compile via C backend, to which I added an LLVM backend [1]. Executables compiled via the LLVM backend (even without exploring any of the LLVM optimisation passes) were faster than the same executables compiled via C (gcc -O2). I suspect this is because the generated C code was nothing like the C code people write and the GCC is only good at optimising idiomatic C code. I highly recommend LLVM as a compiler backend. HTH, Erik [0] http://disciple.ouroborus.net/ [1] http://www.mega-nerd.com/erikd/Blog/CodeHacking/DDC/index.html -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/ --=20 Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/i... --001485394142a84fed04ab6cc823 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Note that the ocaml compiler has a flag -cmm which outputs C-- ast code.=
F. Reig made a c-- ocaml backend during his thesis.=C2=A0 Including a GC. Unhappily, sources code haven't been released.
But it proves it works.

Le=C2=A026 ao=C3=BBt 2011 14:30, "Erik de= Castro Lopo" <mle+oca= ml@mega-nerd.com>=C2=A0a =C3=A9crit=C2=A0:

Pierre-Alexandre Voye wrote:

> I have a stupid question : I wonder if it would not be a bad idea = th...

I have some experience in thie area. I work on the DDC comp= iler [0]
a compiler for a strict by default (optionally lazy) evaluation
dialect of Haskell.

When I joined the project the compiler had a working compile via C
backend, to which I added an LLVM backend [1].

Executables compiled via the LLVM backend (even without exploring
any of the LLVM optimisation passes) were faster than the same
executables compiled via C (gcc -O2). I suspect this is because
the generated C code was nothing like the C code people write and
the GCC is only good at optimising idiomatic C code.

I highly recommend LLVM as a compiler backend.

HTH,
Erik

[0] http://dis= ciple.ouroborus.net/
[1] http://www.mega-nerd.com/erikd/Blog/CodeHacking/DDC/i= ndex.html

--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-ner= d.com/


--
Caml-list mailing list. Subsc= ription management and archives:
https://sympa-roc.inria.fr/wws/i...

--001485394142a84fed04ab6cc823--