Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Sep 2012 10:48:18 -0700
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        Mark Felder <feld@feld.me>
Cc:        Christer Solskogen <christer.solskogen@gmail.com>, toolchain@freebsd.org, Michael Butler <imb@protected-networks.net>, current@freebsd.org
Subject:   Re: Clang as default compiler November 4th
Message-ID:  <20120911174818.GA96512@troutmask.apl.washington.edu>
In-Reply-To: <6a7877fa-190e-465e-ba11-e8506faa9ab7@email.android.com>
References:  <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> <20120911123833.GA54483@freebsd.org> <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> <20120911133215.GB87126@troutmask.apl.washington.edu> <CAMVU60ZVmCaYr=MyLsnz9tqD9O5m9Y8bgYiqtqvUXcYcXj-RmQ@mail.gmail.com> <504F4650.9090700@protected-networks.net> <op.wkhcpr0n34t2sn@me-pc> <20120911170412.GA96297@troutmask.apl.washington.edu> <6a7877fa-190e-465e-ba11-e8506faa9ab7@email.android.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 11, 2012 at 12:14:09PM -0500, Mark Felder wrote:
> "Clang produces incorrect code" vs "Clang's floating point has
> issues" are two different arguments. 

Wow.  clang produces incorrect floating point code, and
that's somehow just an issue with floating point.

> For a mathematical application it would be stupid to use
> clang if this is the case.  I see no problem with it being
> the default compiler though.  If Atlas is in ports ther
> maintainer can just force it to use the latest GCC. 

Last time I checked the code in src/lib/msun was built
by the default compiler into a library named libm.  If
clang can't produce valid floating point code, are you
suggesting that the base should have two compilers one (ie gcc)
for libm and any other application that may use floating
point and one (ie clang) for everything else?

> I'm not sure why Clang being default is somehow a problem for you?

For one, I'm the guy that has been fixing and implementing
missing functions in libm.  I've already shown that clang
generates worse code than base gcc for a single function in libm.

http://lists.freebsd.org/pipermail/freebsd-current/2012-September/036410.html
 
Granted j0f() in my libm had a local patch, but that
local patch actual improves j0f() accuracy over the 
range tested!    

It can take hours (for a quick test) or days (for more
exhaustive testing) to test a simple patch, because I do
testing on i385, amd64, and sparc64 machines.  So, now,
I have to do the testing with 2 compilers.

You'll find that I'm the person that showed that clang 
can't do complex arithmetic correctly.  

http://llvm.org/bugs/show_bug.cgi?id=8532

That bug was reported almost 2 years ago.  

Finally, I'll note that I never stated that having 
clang as the default would be a problem for me.  I know
enough about compilers and floating pointing to test
a new compiler.  It the naive users (and I can assure you 
there are many more naive users than you may believe)
that is of concern.

-- 
Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120911174818.GA96512>