From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id C8D6FBBAF for ; Tue, 5 May 2009 17:07:37 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvwBAC/z/0nUnwckcWdsb2JhbACCH5RXAQwKCQkPBqoMCI9ygi4aCIExBQ X-IronPort-AV: E=Sophos;i="4.40,298,1238968800"; d="scan'208";a="25657676" Received: from relay.ptn-ipout02.plus.net ([212.159.7.36]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 05 May 2009 17:07:37 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicFALfy/0nUnw6U/2dsb2JhbACCH78TCI9ygi4aCIExBQ Received: from fhw-relay07.plus.net ([212.159.14.148]) by relay.ptn-ipout02.plus.net with ESMTP; 05 May 2009 16:07:34 +0100 Received: from [87.112.4.70] (helo=leper.local) by fhw-relay07.plus.net with esmtp (Exim) id 1M1MF1-0007ZO-TR for caml-list@yquem.inria.fr; Tue, 05 May 2009 16:07:32 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocamlopt code generator question Date: Tue, 5 May 2009 16:14:52 +0100 User-Agent: KMail/1.9.9 References: <90823c940904281236x61204451nac149ee15b5df73a@mail.gmail.com> <90823c940905050241y11f012e5xee8316e3e4337ff9@mail.gmail.com> <4A004A05.6040204@lexifi.com> In-Reply-To: <4A004A05.6040204@lexifi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905051614.52276.jon@ffconsultancy.com> X-Plusnet-Relay: a8aa6989bc293470d3b8a42e1c521c59 X-Spam: no; 0.00; ocamlopt:01 lexifi:01 xavier's:01 ocaml:01 predictable:01 bytecode:01 ocamlopt:01 native-code:01 2009:98 donate:98 frog:98 eber:01 wrote:01 stack:01 stack:01 On Tuesday 05 May 2009 15:15:33 Jean-Marc Eber wrote: > Hi Dimitry, > > LexiFi for instance _is_ clearly interested by a sse2 32bit code generator. > > One should probably have the following in mind and/or ask the following > questions: > > - it is probably not a good idea to support both backends (sse2 and old > stack fp i386 architecture). It will be necessary to make a choice > (especially taking in account the limited INRIA resources and the burden of > already supporting different windows ports). > > - would INRIA be ok to switch to a sse2 code generator (based on Dimitry's > patch - supposing that he is ok to donate it to INRIA - or Xavier's work or > whatever)? > > - I also guess that a sse2 code generator would be simpler than the current > one (that has to support this horrible fp stack architecture) and would > therefore be a better candidate for further enhancements. > > - what is the opinion on this list, as a switch to a sse2 backend would > exclude "old" processors from being OCaml compatible (I don't have a > precise list at hand for now) ? > > My opinion is that this support of legacy hardware is not important, but I > guess others are arguing in opposite directions... :-) > > But again, having better floating point performance (and predictable > behaviour, compared to the bytecode version) would be a big plus for some > applications. If the idea is to provide better code generation on x86 going forwards with minimal effort then I'd have thought an LLVM-based backend would be the obvious choice. My tests with HLVM showed that numerical code can be a whopping 8x faster than today's ocamlopt on x86 and, of course, LLVM is improving much more rapidly. LLVM can probably replace the x86, x64 and ppc backends. LLVM also seems like a sane approach to providing a native-code top level via its existing JIT functionality. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e