From owner-freebsd-current@FreeBSD.ORG Wed Sep 5 13:11:25 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 0970C106564A; Wed, 5 Sep 2012 13:11:25 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 868358FC14; Wed, 5 Sep 2012 13:11:24 +0000 (UTC) Received: by vcbgb30 with SMTP id gb30so949268vcb.13 for ; Wed, 05 Sep 2012 06:11:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=G8nGq03LshHGsGSBGdoCQ72669Xy6L7ngfRKazblHxI=; b=KHoYMVkfgmbtqokINGuuYyOmwrGm/vE3DBR6sGHB9TtPI29cHRb1TQMD0M1v4QDIAD dQ+FiNaMErkgSKFEiX6pLI6kcem/Iz2BnOB75fMxQ1G6mHLMqj1KRCJHq/GvF035Hkbz 5i1eZMB/1CH20A/q2g8sOFsbR08PqnwI55LPcvaLTiXKZg/ymux0T7+IXgFc22LTo5Mz 3DvJZh1bGrHnPZFzedYc1PI8MS5mZ/JENHoabPs/2AQQU3ukBlInaRv5CoAEpOVRam3S 4AvAlAEQGptvg04imNmCIoAje269xciNg3mtVPak2migtPcdLqRNW+T0p18gwNqYtow/ b2yA== MIME-Version: 1.0 Received: by 10.220.223.5 with SMTP id ii5mr2454194vcb.51.1346850682664; Wed, 05 Sep 2012 06:11:22 -0700 (PDT) Received: by 10.58.203.136 with HTTP; Wed, 5 Sep 2012 06:11:22 -0700 (PDT) In-Reply-To: <50472FC7.8010500@andric.com> 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> Date: Wed, 5 Sep 2012 09:11:22 -0400 Message-ID: From: Justin Hibbits To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Garrett Cooper , 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 13:11:25 -0000 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. :)