From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 27 22:48:56 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B05A71065672 for ; Thu, 27 Nov 2008 22:48:56 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 1BC168FC18 for ; Thu, 27 Nov 2008 22:48:55 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 27 Nov 2008 22:48:53 -0000 Received: from p54A3F275.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.242.117] by mail.gmx.net (mp023) with SMTP; 27 Nov 2008 23:48:53 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1+pJrobeOmpAuAIkmAPx57ahvc98Yh1wtLZZ43Fgl k4gmk6DxCrpnWO Message-ID: <492F23D5.3000009@gmx.de> Date: Thu, 27 Nov 2008 23:48:53 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: Max Laier References: <492F0591.7050807@gmx.de> <200811272257.01287.max@love2party.net> In-Reply-To: <200811272257.01287.max@love2party.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.57 Cc: freebsd-hackers@freebsd.org Subject: Re: New C compiler and analyzer lang/cparser in ports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2008 22:48:56 -0000 Max Laier schrieb: > On Thursday 27 November 2008 21:39:45 Christoph Mallon wrote: >> A few days ago libFIRM[1] and cparser were added to the ports tree. If >> you want to see, what other compilers besides GCC have to offer, this >> might be of interest for you. libFIRM is a modern optimizing >> intermediate representation (IR) library. cparser is a C compiler >> providing many useful warnings and uses libFIRM for optimization and >> code generation. > > Nice stuff! I remember from a practical work with libFIRM that it is quite > pleasant to work with (though there is a bit of a learning curve). Yes, some design desicions of FIRM seem odd at first - like the use of data dependencies instead of data flow, but once you "get it" it's quite easy. Also you constantly have to maintain SSA form. Sometimes I seems to be a hassle, but usually it prevents you from doing stupid things and when you think about how to do the same thing in non-SSA, you realise how much more hassle that would be. (-: > How are the chances of this code staying under GPL2? I suppose there is no > chance to get it dual-licensed under BSDL as well? I do not want to speculate about this. libFIRM is an university project and I have no idea how hard something like relicensing would be. > In addition, how much work is it to build missing backends? It seems like > there is no amd64 or sparc support at the moment? AMD64 should not be too hard. It is (naturally) very similar to IA32, so basically some extensions to the instruction selection and the ABI transformation should suffice. Other backends need some more work, but a simple instruction selector can be done quite fast. Of course, efficiently using all features of the target machine is considerably more work. If the target is sufficiently "RISCy", all the later phases like spilling and register allocation can directly be used. There are architecures, which are very fancy and need much custom code, but none of the usual architectures like ARM and MIPS fall into this category. There are unfinished backends for other architecures, but the major obstacle to support more backends is the lack of manpower. If you know somebody, who wants to work as Hiwi or who is interested in a study or diploma thesis, send him to us. (-: Regards Christoph