This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: fixed check for sinl in acinclude.m4


On Fri, 23 Jun 2000, Benjamin Kosnik wrote:
> Just because the compiler can parse __builtinfoo, doesn't mean that it 
> does something optimal, or even anything more useful than bailing to the 
> appropriate libm function with it. 
> 
> If builtins are going to use libm functions, there is no sense in using the 
> builtins, and the <math.h> and libm stuff should be used directly. 

  But there is no harm in using the builtins if they use the libm functions and
a definite advantage in using them if they don't.  Currently we have 2 builtins
that use libm funcs (sin and cos) and one builtin that sort of doesn't (sqrt).  
By not checking against libm you disable all three for no gain what so ever,
whereas by checking against libm, all three would be enabled with to the
advantage of any code that uses sqrt and no disadvantage to anyone else.

  Also, -ffast-math apparently only works using the builtin forms, so by
disabling those, you disable that optimization for those that want it as well.

  Unless you can demonstrate why using the builtins are bad, its kinda hard for
me to understand why you find this so objectionable.

-- 
Steven King
sxking@uswest.net

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]