LWN.net Logo

Re: Apple will use LLVM

From:  Vladimir Makarov <vmakarov-AT-redhat.com>
To:  Development discussions related to Fedora <devel-AT-lists.fedoraproject.org>
Subject:  Re: Apple will use LLVM
Date:  Thu, 16 Feb 2012 10:25:19 -0500
Message-ID:  <4F3D1FDF.7010009@redhat.com>
Archive-link:  Article, Thread

On 02/16/2012 10:02 AM, Adam Jackson wrote:
> On Thu, 2012-02-16 at 10:22 +0530, Rahul Sundaram wrote:
>> On 02/16/2012 10:08 AM, Genes MailLists wrote:
>>
>>>    Not to mention that the kernel devs use gcc to compile the kernel -
>>> and it most certainly puts a lot of pressure on the compiler. I suspect
>>> unless linus drops gcc as well, we'll at a minimum need to keep it to
>>> build the kernel itself.
>> Not quite.  LLVM can be used to build the kernel and what Linus does
>> doesn't matter as much (kernel is important but only one component) as
>> showing that Fedora on the whole will actually benefit from moving to
>> LLVM.  For that,  LLVM has to so much better than GCC and someone has to
>> do the work within Fedora to show that it is the case.
> Since I was a bit (intentionally) curt and dismissive in my other
> response in this thread, I'll add some anecdata here.  I have actually
> tried building xserver with clang and running the standard set of
> microbenchmarks.  I found one relevant path where the clang build was
> ~15% faster [1].  Something like 60% of the rest were within ±3%.  For
> everything else clang was uniformly worse by usually about 5%.
>
The another usual mistake when people compare speed of GCC and LLVM is 
to use -O2 for the both compilers.  But the true is that -O1 of GCC is 
-O2 of LLVM with the point of code generation quality.  The compiler 
speed of GCC with -O1 is the same as for LLVM with -O2.  You can find 
the latest comparison of LLVM and GCC on 
http://vmakarov.fedorapeople.org/spec/ (see 2011 comparison at the 
bottom of the left frame).

GCC has a big community of very dedicated people.  LLVM has no such 
community.  So IMHO GCC will be more high quality compiler than LLVM 
until LLVM gets such community.

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

(Log in to post comments)

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds