diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2010-12-04 01:51:14 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2010-12-04 01:51:14 +0000 |
commit | 5f67e13fcdc3c33e9cd5d027bfbb677b726c6f6a (patch) | |
tree | 0092b4ac3cb34529233dc3588a787e9e39915ae9 /include/clang | |
parent | 5d729a3d8eeba59ed97119998f2135ad6d45e876 (diff) |
Implement -cl-unsafe-math-optimizations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Driver/CC1Options.td | 2 | ||||
-rw-r--r-- | include/clang/Frontend/CodeGenOptions.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index 19d3a24fcb..a7b2692101 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -603,3 +603,5 @@ def cl_single_precision_constant : Flag<"-cl-single-precision-constant">, HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">; def cl_finite_math_only : Flag<"-cl-finite-math-only">, HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">; +def cl_unsafe_math_optimizations : Flag<"-cl-unsafe-math-optimizations">, + HelpText<"OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable">; diff --git a/include/clang/Frontend/CodeGenOptions.h b/include/clang/Frontend/CodeGenOptions.h index 3ca3104348..84f500383d 100644 --- a/include/clang/Frontend/CodeGenOptions.h +++ b/include/clang/Frontend/CodeGenOptions.h @@ -75,6 +75,7 @@ public: unsigned UnitAtATime : 1; /// Unused. For mirroring GCC optimization /// selection. unsigned UnrollLoops : 1; /// Control whether loops are unrolled. + unsigned UnsafeFPMath : 1; /// Allow unsafe floating point optzns. unsigned UnwindTables : 1; /// Emit unwind tables. unsigned VerifyModule : 1; /// Control whether the module should be run /// through the LLVM Verifier. @@ -139,6 +140,7 @@ public: TimePasses = 0; UnitAtATime = 1; UnrollLoops = 0; + UnsafeFPMath = 0; UnwindTables = 0; VerifyModule = 1; |