diff options
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Basic/LangOptions.def | 1 | ||||
-rw-r--r-- | include/clang/Basic/LangOptions.h | 6 | ||||
-rw-r--r-- | include/clang/Driver/Options.td | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/Basic/LangOptions.def b/include/clang/Basic/LangOptions.def index 381b1ba2f0..aa4d25c1b1 100644 --- a/include/clang/Basic/LangOptions.def +++ b/include/clang/Basic/LangOptions.def @@ -148,6 +148,7 @@ ENUM_LANGOPT(StackProtector, StackProtectorMode, 2, SSPOff, "stack protector mode") ENUM_LANGOPT(SignedOverflowBehavior, SignedOverflowBehaviorTy, 2, SOB_Undefined, "signed integer overflow handling") +ENUM_LANGOPT(FPContractMode, FPContractModeTy, 2, FPC_On, "FP_CONTRACT mode") BENIGN_LANGOPT(InstantiationDepth, 32, 512, "maximum template instantiation depth") diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h index 10f496fd39..fbb014e967 100644 --- a/include/clang/Basic/LangOptions.h +++ b/include/clang/Basic/LangOptions.h @@ -56,6 +56,12 @@ public: SOB_Trapping // -ftrapv }; + enum FPContractModeKind { + FPC_Off, // Form fused FP ops only where result will not be affected. + FPC_On, // Form fused FP ops according to FP_CONTRACT rules. + FPC_Fast // Aggressively fuse FP ops (E.g. FMA). + }; + public: clang::ObjCRuntime ObjCRuntime; diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 4d23f47d85..48f9cd68b8 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -410,6 +410,9 @@ def fhonor_infinites : Flag<"-fhonor-infinites">, Alias<fhonor_infinities>; def fno_honor_infinites : Flag<"-fno-honor-infinites">, Alias<fno_honor_infinities>; def ftrapping_math : Flag<"-ftrapping-math">, Group<f_Group>; def fno_trapping_math : Flag<"-fno-trapping-math">, Group<f_Group>; +def ffp_contract : Joined<"-ffp-contract=">, Group<f_Group>, + Flags<[CC1Option]>, HelpText<"Form fused FP ops (e.g. FMAs): fast (everywhere)" + " | on (according to FP_CONTRACT pragma, default) | off (never fuse)">; def ffor_scope : Flag<"-ffor-scope">, Group<f_Group>; def fno_for_scope : Flag<"-fno-for-scope">, Group<f_Group>; |