diff options
author | liuhongt <hongtao.liu@intel.com> | 2021-08-02 10:56:45 +0800 |
---|---|---|
committer | liuhongt <hongtao.liu@intel.com> | 2021-09-08 12:44:49 +0800 |
commit | f19a327077ecc34a51487761378b9edb43c82997 (patch) | |
tree | fd3b704957ec91abaa1ce10931e9afb969fe18c7 /gcc/common.opt | |
parent | a549a9a39a9bd92107667b99a67acbd7ef551323 (diff) | |
download | gcc-f19a327077ecc34a51487761378b9edb43c82997.zip gcc-f19a327077ecc34a51487761378b9edb43c82997.tar.gz gcc-f19a327077ecc34a51487761378b9edb43c82997.tar.bz2 |
Support -fexcess-precision=16 which will enable FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 when backend supports _Float16.
gcc/ada/ChangeLog:
* gcc-interface/misc.c (gnat_post_options): Issue an error for
-fexcess-precision=16.
gcc/c-family/ChangeLog:
* c-common.c (excess_precision_mode_join): Update below comments.
(c_ts18661_flt_eval_method): Set excess_precision_type to
EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
* c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
(c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
gcc/ChangeLog:
* common.opt: Support -fexcess-precision=16.
* config/aarch64/aarch64.c (aarch64_excess_precision): Return
FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 when
EXCESS_PRECISION_TYPE_FLOAT16.
* config/arm/arm.c (arm_excess_precision): Ditto.
* config/i386/i386.c (ix86_get_excess_precision): Ditto.
* config/m68k/m68k.c (m68k_excess_precision): Issue an error
when EXCESS_PRECISION_TYPE_FLOAT16.
* config/s390/s390.c (s390_excess_precision): Ditto.
* coretypes.h (enum excess_precision_type): Add
EXCESS_PRECISION_TYPE_FLOAT16.
* doc/tm.texi (TARGET_C_EXCESS_PRECISION): Update documents.
* doc/tm.texi.in (TARGET_C_EXCESS_PRECISION): Ditto.
* doc/extend.texi (Half-Precision): Document
-fexcess-precision=16.
* flag-types.h (enum excess_precision): Add
EXCESS_PRECISION_FLOAT16.
* target.def (excess_precision): Update document.
* tree.c (excess_precision_type): Set excess_precision_type to
EXCESS_PRECISION_FLOAT16 when -fexcess-precision=16.
gcc/fortran/ChangeLog:
* options.c (gfc_post_options): Issue an error for
-fexcess-precision=16.
gcc/testsuite/ChangeLog:
* gcc.target/i386/float16-6.c: New test.
* gcc.target/i386/float16-7.c: New test.
Diffstat (limited to 'gcc/common.opt')
-rw-r--r-- | gcc/common.opt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/common.opt b/gcc/common.opt index 7d69ab5..f103a7d 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1518,7 +1518,7 @@ Perform a number of minor, expensive optimizations. fexcess-precision= Common Joined RejectNegative Enum(excess_precision) Var(flag_excess_precision) Init(EXCESS_PRECISION_DEFAULT) Optimization SetByCombined --fexcess-precision=[fast|standard] Specify handling of excess floating-point precision. +-fexcess-precision=[fast|standard|16] Specify handling of excess floating-point precision. Enum Name(excess_precision) Type(enum excess_precision) UnknownError(unknown excess precision style %qs) @@ -1529,6 +1529,9 @@ Enum(excess_precision) String(fast) Value(EXCESS_PRECISION_FAST) EnumValue Enum(excess_precision) String(standard) Value(EXCESS_PRECISION_STANDARD) +EnumValue +Enum(excess_precision) String(16) Value(EXCESS_PRECISION_FLOAT16) + ; Whether we permit the extended set of values for FLT_EVAL_METHOD ; introduced in ISO/IEC TS 18661-3, or limit ourselves to those in C99/C11. fpermitted-flt-eval-methods= |