From 3d3dbaddce17ecb312558f77bf32e3b0cc3d5fe5 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 12 Dec 2014 11:46:00 +0100 Subject: real.h (HONOR_SNANS, [...]): Replace macros with 3 overloaded declarations. 2014-12-12 Marc Glisse * 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 --- gcc/real.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'gcc/real.h') 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 *, -- cgit v1.1