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.0 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 6C1F8BC37 for ; Thu, 3 Sep 2009 11:44:53 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.44,324,1249250400"; d="scan'208";a="32131375" Received: from estephe.inria.fr ([128.93.11.95]) by mail2-relais-roc.national.inria.fr with ESMTP; 03 Sep 2009 11:44:53 +0200 Message-ID: <4A9F9015.2010408@inria.fr> Date: Thu, 03 Sep 2009 11:44:53 +0200 From: Xavier Leroy User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: Will M Farr Cc: caml-list@inria.fr Subject: Re: [Caml-list] Optimizing Float Ref's References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ref's:01 ocaml:01 unboxed:01 dims:01 unboxed:01 reproduces:01 ref's:01 compiler:01 stack:01 caml-list:01 omitted:01 native:03 float:03 float:03 optimizing:03 > I'm running OCaml 3.11.1, and I noticed something strange in some native > code for matrix multiply today. The code was > [...] > [Local float ref being unboxed or not? ] You omitted the definition of "dims", but after adding the obvious definition, the float ref "sum" is indeed completely unboxed and is kept in a float register (on x86-64 bits) or stack location (on x86-32 bits). No "modify" takes place in the inner loop. So, I don't understand the problem you observed. Feel free to post a report on the BTS with a *complete* piece of code that reproduces the problem. > But, I thought that float ref's were automatically unboxed by the > compiler when they didn't escape the local context. Yes, if all uses of the float ref are unboxed, which is the case in your code. - Xavier Leroy