From owner-freebsd-toolchain@FreeBSD.ORG Mon Jan 7 09:18:03 2013 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A8042AD8; Mon, 7 Jan 2013 09:18:03 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 6BFA8396; Mon, 7 Jan 2013 09:18:03 +0000 (UTC) Received: from JRE-MBP-2.local (c-50-143-148-105.hsd1.ca.comcast.net [50.143.148.105]) (authenticated bits=0) by vps1.elischer.org (8.14.5/8.14.5) with ESMTP id r079I1BG066933 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 7 Jan 2013 01:18:02 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <50EA92C4.2080808@freebsd.org> Date: Mon, 07 Jan 2013 01:17:56 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Nathan Whitehorn Subject: Re: LLVM Image Activator References: <50E9BC2D.7000302@freebsd.org> In-Reply-To: <50E9BC2D.7000302@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-toolchain@freebsd.org, freebsd-arch@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2013 09:18:03 -0000 On 1/6/13 10:02 AM, Nathan Whitehorn wrote: > Having LLVM/clang in the base system lets us do some interesting things > that we couldn't do with GCC. One is that LLVM ships with a JIT for LLVM > IR as well as components of a toolchain for it (this is what Google's > pNACL uses) and that you can end up producing binary files that are in > IR instead of native code. The IR isn't really cross-platform, but does > let you do CPU-specific optimizations when executed by the JIT, etc. > > The attached patch causes the LLVM JIT (lli) to be built by default > (adding ~20 seconds to buildworld on my five-year-old laptop) and adds a > kernel image activator that invokes it when passed LLVM bitcode files. > It's not completely finished (see the XXX comment in the middle), but it > does work, as follows: > > $ clang -emit-llvm -c -o hw.ll hw.c > $ file hw.ll > hw.ll: LLVM bitcode > $ lli hw.ll > Hello world! > $ chmod a+x hw.ll > $ ./hw.ll > Hello world! > $ > > Is there any interest in having features like this? It seems like this > could provides some interesting possibilities for us and nice > integration from having imported clang into base. > -Nathan sounds like a nice idea. I'd put it in if you can find a few other supporters.. (especially ones who can help with maintenance. > > > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"