[llvm-commits] [llvm-gcc-4.2] r63322 - /llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
Chris Lattner
sabre at nondot.org
Thu Jan 29 10:16:32 PST 2009
Author: lattner
Date: Thu Jan 29 12:16:31 2009
New Revision: 63322
URL: http://llvm.org/viewvc/llvm-project?rev=63322&view=rev
Log:
Default -fno-math-errno to on with all i386 targets. This is after discussion
with Anton and Duncan. -fmath-errno still works to enable it.
Modified:
llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/i386.c?rev=63322&r1=63321&r2=63322&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/i386.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/i386.c Thu Jan 29 12:16:31 2009
@@ -2438,7 +2438,16 @@
flag_trapping_math = 0;
/* APPLE LOCAL end pragma fenv */
- if (TARGET_MACHO)
+ /* APPLE LOCAL begin LLVM */
+ /* Enable -fno-math-errno by default, even on systems whose libm functions set
+ errno. This is a deviation from what mainline GCC does, but it is a) good
+ for performance, b) controllable with -fmath-errno, and c) the default
+ behavior most people want anyway. Numericists and others who play with or
+ depend on errno and can use -fmath-errno when they want it. Because errno
+ is not set on all targets anyway, their code is inherently non-portable. */
+ if (TARGET_MACHO || 1)
+ /* APPLE LOCAL end LLVM */
+
/* The Darwin libraries never set errno, so we might as well
avoid calling them when that's the only reason we would. */
flag_errno_math = 0;
More information about the llvm-commits
mailing list