From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 11 17:09:29 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 809C5106564A; Thu, 11 Jun 2009 17:09:29 +0000 (UTC) (envelope-from pawel.worach@gmail.com) Received: from mail-bw0-f227.google.com (mail-bw0-f227.google.com [209.85.218.227]) by mx1.freebsd.org (Postfix) with ESMTP id D24AF8FC12; Thu, 11 Jun 2009 17:09:28 +0000 (UTC) (envelope-from pawel.worach@gmail.com) Received: by bwz27 with SMTP id 27so47930bwz.43 for ; Thu, 11 Jun 2009 10:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=gHs19X3IJpMx4zhtfhdU85fLam8VjJl6K4GYdHfTrVg=; b=WWfdqKowfmgXU/5hNdlxnCfkWF/cLhq8ubq7v//JKAIBdCmXMBLGOB7eERpK+ikZgk WYqtOuDMW/xoby2YQ5ZOouQSeHGj6qFghxHx9UT/xZLUoP/kGEIH6SEbvVA3qe7D7/X0 TlAXIHtdPDUAawehi7NshjlqqpLhdmEvuD1Rk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=L5vuzueSkGHP5HYzlu5Zx+BQYFyrknLuDoZ+yarHVv3iJ3ntDcTo8llbPaZnMEB/AZ G8bzzvmhB3/qiq+E2I6mFvS0/irNX30/9N0ypKg1Rv2NI4Ms9fHB8FzaWbW3678pk9S1 QnvsrO6qLVjYW+GfLSC2CmukjgGw/rQYpID6k= MIME-Version: 1.0 Received: by 10.204.100.201 with SMTP id z9mr2668581bkn.168.1244740167103; Thu, 11 Jun 2009 10:09:27 -0700 (PDT) In-Reply-To: <20090609101745.GE48776@hoeg.nl> References: <20090604093831.GE48776@hoeg.nl> <20090608.120552.756910862.imp@bsdimp.com> <20090609101745.GE48776@hoeg.nl> Date: Thu, 11 Jun 2009 19:09:27 +0200 Message-ID: From: Pawel Worach To: Ed Schouten Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, current@freebsd.org Subject: Re: Clang: now available from a SVN server near you! 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, 11 Jun 2009 17:09:29 -0000 On Tue, Jun 9, 2009 at 12:17, Ed Schouten wrote: > * Pawel Worach wrote: >> So runtime performance is on par with gcc, code size is a bit bigger >> so there is still room for optimization in LLVM. > > I don't agree on the code size. Code size is comparable. I just did a > quick ls through /bin. There also seem to be a lot of cases where Clang > generates smaller binaries. > > Some time ago the binaries were indeed a lot bigger, but that turned out > to be a bug in Clang, where a compiler flag had a wrong default value, > namely the flag that determined whether zero-initialized data had to go > in BSS or not. Here are some updated results with llvm/clang r73189. Compile time and executable size for amd64 LINT (without profiling because clang does not support it yet): clang: 314.582u 29.555s 5:44.72 99.8% 14250+2428k 0+0io 481pf+0w text data bss dec hex filename 18034015 3563057 2910192 24507264 175f380 kernel -rwxr-xr-x 1 root wheel 27208927 Jun 11 14:34 kernel gcc: 510.206u 30.260s 8:56.93 100.6% 7032+2414k 0+0io 14pf+0w text data bss dec hex filename 17342564 2623505 2918704 22884773 15d31a5 kernel -rwxr-xr-x 1 root wheel 24115620 Jun 11 14:45 kernel Also an updated ports/benchmarks/libmicro run available here: http://www.vlakno.cz/~pwo/lm/2009-06-11/lm.html -- Pawel