aboutsummaryrefslogtreecommitdiff
path: root/gcc/real.h
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2014-12-12 11:46:00 +0100
committerMarc Glisse <glisse@gcc.gnu.org>2014-12-12 10:46:00 +0000
commit3d3dbaddce17ecb312558f77bf32e3b0cc3d5fe5 (patch)
tree6e8c286bbdbceedd094b4c74d98033969cce3446 /gcc/real.h
parent3b41b58357054c9f236e265f68a4d852b57fa62d (diff)
downloadgcc-3d3dbaddce17ecb312558f77bf32e3b0cc3d5fe5.zip
gcc-3d3dbaddce17ecb312558f77bf32e3b0cc3d5fe5.tar.gz
gcc-3d3dbaddce17ecb312558f77bf32e3b0cc3d5fe5.tar.bz2
real.h (HONOR_SNANS, [...]): Replace macros with 3 overloaded declarations.
2014-12-12 Marc Glisse <marc.glisse@inria.fr> * real.h (HONOR_SNANS, HONOR_INFINITIES, HONOR_SIGNED_ZEROS, HONOR_SIGN_DEPENDENT_ROUNDING): Replace macros with 3 overloaded declarations. * real.c (HONOR_NANS): Fix indentation. (HONOR_SNANS, HONOR_INFINITIES, HONOR_SIGNED_ZEROS, HONOR_SIGN_DEPENDENT_ROUNDING): Define three overloads. * builtins.c (fold_builtin_cproj, fold_builtin_signbit, fold_builtin_fmin_fmax, fold_builtin_classify): Simplify argument of HONOR_*. * fold-const.c (operand_equal_p, fold_comparison, fold_binary_loc): Likewise. * gimple-fold.c (gimple_val_nonnegative_real_p): Likewise. * ifcvt.c (noce_try_move, noce_try_minmax, noce_try_abs): Likewise. * omp-low.c (omp_reduction_init): Likewise. * rtlanal.c (may_trap_p_1): Likewise. * simplify-rtx.c (simplify_const_relational_operation): Likewise. * tree-ssa-dom.c (record_equality, record_edge_info): Likewise. * tree-ssa-phiopt.c (value_replacement, abs_replacement): Likewise. * tree-ssa-reassoc.c (eliminate_using_constants): Likewise. * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise. From-SVN: r218663
Diffstat (limited to 'gcc/real.h')
-rw-r--r--gcc/real.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/gcc/real.h b/gcc/real.h
index bfdd1e6..aa312ad 100644
--- a/gcc/real.h
+++ b/gcc/real.h
@@ -195,6 +195,8 @@ extern const struct real_format *
(FLOAT_MODE_P (MODE) \
&& FLOAT_MODE_FORMAT (MODE)->has_sign_dependent_rounding)
+/* Declare functions in real.c. */
+
/* True if the given mode has a NaN representation and the treatment of
NaN operands is important. Certain optimizations, such as folding
x * 0 into 0, are not correct for NaN operands, and are normally
@@ -205,24 +207,27 @@ extern bool HONOR_NANS (const_tree);
extern bool HONOR_NANS (const_rtx);
/* Like HONOR_NANs, but true if we honor signaling NaNs (or sNaNs). */
-#define HONOR_SNANS(MODE) (flag_signaling_nans && HONOR_NANS (MODE))
+extern bool HONOR_SNANS (machine_mode);
+extern bool HONOR_SNANS (const_tree);
+extern bool HONOR_SNANS (const_rtx);
/* As for HONOR_NANS, but true if the mode can represent infinity and
the treatment of infinite values is important. */
-#define HONOR_INFINITIES(MODE) \
- (MODE_HAS_INFINITIES (MODE) && !flag_finite_math_only)
+extern bool HONOR_INFINITIES (machine_mode);
+extern bool HONOR_INFINITIES (const_tree);
+extern bool HONOR_INFINITIES (const_rtx);
/* Like HONOR_NANS, but true if the given mode distinguishes between
positive and negative zero, and the sign of zero is important. */
-#define HONOR_SIGNED_ZEROS(MODE) \
- (MODE_HAS_SIGNED_ZEROS (MODE) && flag_signed_zeros)
+extern bool HONOR_SIGNED_ZEROS (machine_mode);
+extern bool HONOR_SIGNED_ZEROS (const_tree);
+extern bool HONOR_SIGNED_ZEROS (const_rtx);
/* Like HONOR_NANS, but true if given mode supports sign-dependent rounding,
and the rounding mode is important. */
-#define HONOR_SIGN_DEPENDENT_ROUNDING(MODE) \
- (MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && flag_rounding_math)
-
-/* Declare functions in real.c. */
+extern bool HONOR_SIGN_DEPENDENT_ROUNDING (machine_mode);
+extern bool HONOR_SIGN_DEPENDENT_ROUNDING (const_tree);
+extern bool HONOR_SIGN_DEPENDENT_ROUNDING (const_rtx);
/* Binary or unary arithmetic on tree_code. */
extern bool real_arithmetic (REAL_VALUE_TYPE *, int, const REAL_VALUE_TYPE *,