From owner-freebsd-current@FreeBSD.ORG Wed Sep 5 17:37:13 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 74AEA106566C; Wed, 5 Sep 2012 17:37:13 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 2EF018FC12; Wed, 5 Sep 2012 17:37:13 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 93F7F7F3888; Wed, 5 Sep 2012 19:37:04 +0200 (CEST) Date: Wed, 5 Sep 2012 19:37:04 +0200 From: Roman Divacky To: Justin Hibbits Message-ID: <20120905173704.GA31250@freebsd.org> 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> <50472FC7.8010500@andric.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Garrett Cooper , Dimitry Andric , freebsd-current@freebsd.org, David Chisnall , 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 17:37:13 -0000 What makes you think it's a bug in llvm code and not a plain gcc miscompile? Other people seem to compile llvm on PPC64 with gcc and -fstrict-aliasing just fine. They just dont happen to use gcc4.2.1. Ie. gcc47 is reported to not have this problem. I personally can confirm that fbsd+gcc48 is ok to On Wed, Sep 05, 2012 at 09:11:22AM -0400, Justin Hibbits wrote: > On Wed, Sep 5, 2012 at 6:56 AM, Dimitry Andric wrote: > > > 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... > > > Aliasing problems are seen much more frequently on PowerPC than any other > platform for Clang. I found this a while back when doing some Clang > testing, and I still see problems with upstream unless I explicitly set > -fno-strict-aliasing. Nathan had mentioned wanting to get upstream to use > -fno-strict-aliasing by default on all platforms, but I don't think that > ever made it beyond his suggesting. > > I filed this bug to track it: http://llvm.org/bugs/show_bug.cgi?id=11955 > > > 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. :) > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"