From owner-freebsd-current@FreeBSD.ORG Wed Sep 5 10:56:06 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6469106566C; Wed, 5 Sep 2012 10:56:06 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8D5748FC0A; Wed, 5 Sep 2012 10:56:06 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:d43c:3039:49b5:2229] (unknown [IPv6:2001:7b8:3a7:0:d43c:3039:49b5:2229]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id B89355C43; Wed, 5 Sep 2012 12:56:05 +0200 (CEST) Message-ID: <50472FC7.8010500@andric.com> Date: Wed, 05 Sep 2012 12:56:07 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120828 Thunderbird/16.0 MIME-Version: 1.0 To: David Chisnall References: <5046670C.6050500@andric.com> <20120904214344.GA17723@troutmask.apl.washington.edu> <504679CB.90204@andric.com> <20120904221413.GA19395@troutmask.apl.washington.edu> <50471BEE.6030708@andric.com> <96BD00DE-865C-4690-A2F1-E5B7C5D221C0@FreeBSD.org> In-Reply-To: <96BD00DE-865C-4690-A2F1-E5B7C5D221C0@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Garrett Cooper , freebsd-current@FreeBSD.org, Steve Kargl Subject: Re: Compiler performance tests on FreeBSD 10.0-CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 10:56:06 -0000 On 2012-09-05 11:36, David Chisnall wrote: > On 5 Sep 2012, at 10:31, Dimitry Andric wrote: >> TThe >> -fno-strict-aliasing is not really my choice, but it was introduced >> in the past by Nathan Whitehorn, who apparently saw problems without >> it. It will hopefully disappear in the future. > Clang currently defaults to no strict aliasing on FreeBSD. Yes, but upstream has never used -fno-strict-aliasing, just plain -O2. I run regular separate builds of pristine upstream clang on FreeBSD, and I haven't seen any failures due aliasing problems in all the regression tests. That doesn't guarantee there are no problems, of course... > In my experience, most C programmers misunderstand the aliasing rules of C and even people on the C++ standards committee often get them wrong for C++, so trading a 1-10% performance increase for a significant chance of generating non-working code seems like a poor gain. If people are certain that they do understand the rules, then they can add -fstrict-aliasing to their own CFLAGS. I'm actually quite interested in the performance difference; I think I will run a few tests. :)