History log of /external/clang/test/Driver/fast-math.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/Driver/fast-math.c
b69557ed6f6d5063705e60f771a612aa62ec6b22 18-May-2013 Chandler Carruth <chandlerc@gmail.com> Fix a logic bug in the handling of -fmath-errno in the driver. We would
imply -fno-math-errno if the user passed -fno-fast-math OR -ffast-math,
regardless of in which order and regardless of the tool chain default.

I've fixed this to follow the logic:

1) If the last dominating flag is -fno-math-errno, -ffast-math, or
-Ofast, then do not use math-errno.
2) If the last dominating flag is an explicit -fmath-errno, do use
math-errno.
3) Otherwise, use the toolchain default.

This, for example, allows the flag sequence
'-ffast-math ... -fno-fast-math' with no mention of '-fmath-errno' or
'-fno-math-errno' to preserve the toolchain default. Most notably, this
should prevent users trying to disable fast-math optimizations on Darwin
and BSD platforms from simultaneously enabling (pointless) -fmath-errno.

I've enhanced the tests (after more reorganization) to cover this and
other weird permutations of flags and targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Driver/fast-math.c
edc313343dc64c3113f01ea7cf902465e7c1da55 18-May-2013 Chandler Carruth <chandlerc@gmail.com> Slight reorganization of the fast-math tests which test for errno
setting. Consolidate the collection of tests that enable -fmath-errno
and share a single CHECK line for simplicity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Driver/fast-math.c
5e4ccb4d19e0f62c5f9ddb506297e86e3f2fc21c 11-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> clang/test/Driver: Introduce the feature "clang-driver", set if gcc driver is not used.

It is not set at targetting cygming. See PR12920.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Driver/fast-math.c
80ecf5e66738a7058da58489ca55200212f3d42c 26-Sep-2012 Chad Rosier <mcrosier@apple.com> [driver] Add support for the -fno-fast-math option.
rdar://12299433

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Driver/fast-math.c
769aa2d46fa5dc0bee5285c95a80ad8749cb79cf 02-May-2012 Benjamin Kramer <benny.kra@googlemail.com> Driver: Turn the default value for -fmath-errno into a proper target hook and disable it by default on more platforms.

For now -fno-math-errno is the default on BSD-derived platforms (Darwin,
DragonFlyBSD, FreeBSD, NetBSD, OpenBSD). If the default is not right for
your platform, please yell. I only verified the result with the default
compilers on Darwin and FreeBSD.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Driver/fast-math.c
ba82a619a9a8d96c4e2aa166c2eece3f28e5f117 27-Apr-2012 NAKAMURA Takumi <geek4civic@gmail.com> test/Driver/fast-math.c: Mark this as XFAIL:cygming. They use gcc driver for as.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Driver/fast-math.c
4f50c50e783461ea1ec47dd6fe9be10aafcd76ad 26-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Fix a long-standing bug where Clang had a different default from GCC on
Linux and other (non-Darwin) platforms and have it use -fmath-errno by
default (for better or worse).

Darwin has seen the light here and uses -fno-math-errno by default, this
patch preserves that.

If any maintainers for a non-Linux platform would also like to opt-in to
-fno-math-errno by default, I'm happy to add folks, but we're currently
getting buts and misleading comparisons with GCC due to this difference
in behavior on Linux at least.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Driver/fast-math.c
abf07a7fb669dcb74040eef948d61dfe3c59ff17 02-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Fix PR11685 by implementing -ffast-math and its various friends in the
Clang driver. This involves a bunch of silly option parsing code to try
to carefully emulate GCC's options. Currently, this takes a conservative
approach, and unless all of the unsafe optimizations are enabled, none
of them are. The fine grained control doesn't seem particularly useful.
If it ever becomes useful, we can add that to LLVM first, and then
expose it here.

This also fixes a few tiny bugs in the flag management around
-fhonor-infinities and -fhonor-nans; the flags now form proper sets both
for enabling and disabling, with the last flag winning.

I've also implemented a moderately terrifying GCC feature where
a language change is also provided by the '-ffast-math' flag by defining
the __FAST_MATH__ preprocessor macro. This feature is tracked and
serialized in the frontend but it isn't used yet. A subsequent patch
will add the preprocessor macro and tests for it.

I've manually tested that codegen appears to respect this, but I've not
dug in enough to see if there is an easy way to test codegen options w/o
relying on the particulars of LLVM's optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Driver/fast-math.c