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 p71H3PNG003677 for ; Mon, 1 Aug 2011 19:03:25 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnsBADLbNk7RVaE2kGdsb2JhbABBp1kIFAEBAQEJCQ0HFAQhgUABAQEBAgESAiwBAQcwAQQLCxIiEjQBBQEODgY1h0oCAqJqCo8DAY4QBYVjX59LPINe X-IronPort-AV: E=Sophos;i="4.67,301,1309730400"; d="scan'208";a="104448120" Received: from mail-fx0-f54.google.com ([209.85.161.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 01 Aug 2011 19:03:19 +0200 Received: by fxe4 with SMTP id 4so9381737fxe.27 for ; Mon, 01 Aug 2011 10:03:19 -0700 (PDT) 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=6BqrJvjCkV29GvwiTdApQdFe5E12Tc72VkhwFi9AWaU=; b=h6JH6sxLtl7XbYX3a/b6D3wG+0WAoMIsm20BOWogMciG2yD+afyOuD/lMb7ohdYC6e vqUPXLekONu74ol52PIuEZ5JxQJjnbay7m7mNJ8KhqJ7TgiZhi7YRGaWfCQCUwh3n1iH 6nnI4MFlGacw44wQ/gLnVctCneT4kJaPNz1Bg= Received: by 10.223.17.141 with SMTP id s13mr1422793faa.7.1312218199486; Mon, 01 Aug 2011 10:03:19 -0700 (PDT) Received: from coruscant.kosmos.all (ip-95-223-170-32.unitymediagroup.de [95.223.170.32]) by mx.google.com with ESMTPS id 28sm2990894fax.3.2011.08.01.10.03.15 (version=SSLv3 cipher=OTHER); Mon, 01 Aug 2011 10:03:16 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=iso-8859-1 From: Benedikt Meurer In-Reply-To: Date: Mon, 1 Aug 2011 19:03:13 +0200 Cc: caml-list@inria.fr, Marcell Fischbach Message-Id: <182A8FD1-44FC-4772-8094-E74B0BD68166@googlemail.com> References: <93199F3B-E9CF-4D93-9B2B-BAAB03F4FC08@googlemail.com> To: Wojciech Meyer X-Mailer: Apple Mail (2.1244.3) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p71H3PNG003677 Subject: Re: [Caml-list] Linear Scan Register Allocator for ocamlopt/ocamlnat On Aug 1, 2011, at 17:29 , Wojciech Meyer wrote: > Hello Benedikt, Hello Wojciech, > It's also worth to note that there is some generic mid/back-end code ready, in my OCaml native compiler framework called DragonKit in a spirit of LLVM, which I am currently actively working on. It's already able to express a toy language and JIT compile and run it within the same process on top of x86 architecture: > > The code includes: > - SSA based IL using polymorphic variants > - monadic code generator > - plugable passes using first class modules > - very ad-hoc register allocator > - X86 backend > - example that evolved from LLVM kaleidoscope ported to DragonKit to Pascal/ML like language, and another example using direct translation to X86 backend. > > The code is functorised and almost purely functional (with few exceptions where there is no benefit of doing that). > > Maybe it could have some use in your new toplevel, or maybe it would be worth to reuse some of your work in DragonKit (or viceversa). > > I welcome anybody wanting to join me in this effort. > > Please take a look at: > > www.github.com/danmey/DragonKit I doubt that this would be applicable in the context of ocamlopt. What we are heading for is simply a way to avoid the external as and ld invocations by doing the work in-process. Code generation is done already, we just replace the last phase (see emit.ml). BTW: On a related note, we also have a student working on a LLVM backend for ocamlopt as part of his bachelor thesis, which may be related to what you do. > Cheers; > Wojciech greets, Benedikt