Compiler performance tests on FreeBSD 10.0-CURRENT

Roman Divacky rdivacky at freebsd.org
Wed Sep 5 17:45:12 UTC 2012


I've been compiling clang with itself on PPC64 for a while now. Works quite
good :)

On Wed, Sep 05, 2012 at 01:44:00PM -0400, Justin Hibbits wrote:
> Actually, Nathan does say it's gcc's fault in a comment on that bug.
>  However, I do all my clang work compiling it with gcc4.2.1, so run into
> this constantly when I forget to add the flag.
> 
> - Justin
> 
> On Wed, Sep 5, 2012 at 1:37 PM, Roman Divacky <rdivacky at freebsd.org> wrote:
> 
> > 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 <dimitry at andric.com>
> > 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 at freebsd.org mailing list
> > > http://lists.freebsd.org/mailman/listinfo/freebsd-current
> > > To unsubscribe, send any mail to "
> > freebsd-current-unsubscribe at freebsd.org"
> >
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"


More information about the freebsd-current mailing list