From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22563 invoked by alias); 23 Oct 2009 12:02:44 -0000 Received: (qmail 22241 invoked by uid 22791); 23 Oct 2009 12:02:43 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Oct 2009 12:02:39 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9NC2bYw001806 for ; Fri, 23 Oct 2009 08:02:37 -0400 Received: from zebedee.pink (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9NC2a17009414; Fri, 23 Oct 2009 08:02:36 -0400 Message-ID: <4AE19B5B.60908@redhat.com> Date: Fri, 23 Oct 2009 12:02:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: Anthony Green CC: libffi-discuss@sourceware.org Subject: Re: libffi & LLVM References: <4AE1965D.1030808@redhat.com> In-Reply-To: <4AE1965D.1030808@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org X-SW-Source: 2009/txt/msg00318.txt.bz2 Anthony Green wrote: > The latest MacRuby version replaced libffi with LLVM for closure > support, the result of which is 3 to 4 times performance boost: > http://www.macruby.org/blog/2009/10/07/macruby05b1.html I wonder if they measured the overhead for generating the closures. If they didn't, perhaps we should. Also, LLVM has a pretty big footprint. So, it's not all positive. > I've been thinking for a while that a LLVM backend to libffi makes > sense. Does anybody have any thoughts or opinions on this? It makes some sense, but I warn you: while working on Shark we've found that the JIT interfaces to LLVM are rather unstable. We'd be setting libffi up for an eternal game of catch-up every time the LLVM interfaces change. (Perhaps not eternal: there's every chance that as LLVM matures its JIT interface will stabilize.) A better solution for libffi closures would be for libffi to generate its own code, but I think that would be too much effort, given the complexity of some of the ABIs we have to work with. Andrew.