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 p7QAxvI0029904 for ; Fri, 26 Aug 2011 12:59:57 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As4AAKh7V05V2gB5mWdsb2JhbABCqCwBAQEBAQgLCwcUJYFAAQEFeRALEjQUKA0UiAe7MA6GPgSkHA X-IronPort-AV: E=Sophos;i="4.68,284,1312149600"; d="scan'208";a="106708060" Received: from emailfrontal2.citycable.ch ([85.218.0.121]) by mail4-smtp-sop.national.inria.fr with SMTP; 26 Aug 2011 12:59:51 +0200 X-Alinto-smtpauth-localdomain: Yes Received: from seldon (unknown [85.218.93.239]) (Authenticated sender: guillaume.yziquel@citycable.ch) by emailfrontal2.citycable.ch (Postfix) with ESMTPA id 8556520C02E; Fri, 26 Aug 2011 12:59:45 +0200 (CEST) Received: from yziquel by seldon with local (Exim 4.72) (envelope-from ) id 1Qwu78-0000yU-8I; Fri, 26 Aug 2011 12:58:18 +0200 Date: Fri, 26 Aug 2011 12:58:18 +0200 From: Guillaume Yziquel To: Pierre-Alexandre Voye Cc: Gerd Stolpmann , Benedikt Meurer , caml-list@inria.fr, Fischbach Marcell Message-ID: <20110826105818.GZ4564@localhost> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p7QAxvI0029904 Subject: Re: [Caml-list] Linear Scan Register Allocator for ocamlopt/ocamlnat Le Thursday 25 Aug 2011 à 12:25:49 (+0200), Pierre-Alexandre Voye a écrit : > I have a stupid question : I wonder if it would not be a bad idea that > Ocaml output C code and let gcc do its work, so compile code with good > performances in a lot of architecture ? Gcc is able to do > autovectorization (SSE, MMX, Larabee in the futur, etc...), very > specific processor optimization, etc... > But maybe it's a stupid idea ? I do not think it's a stupid idea. I've been quite stunned by how the Mercury compiler does it (using cpp macros and so-called virtual registers in C code). It's likely a pain however, and most compilers I've seen using the "compile to C" approach usually use Boehm's GC, so it may be quite a pain to adapt the OCaml runtime to it. However, gcc isn't the golden bullet for everything. It definitely sucks with the SIMD instruction set. -- Guillaume Yziquel