This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch removes force_fit_type in favor of force_fit_type_double that takes a double-int and a type argument. This reduces intermediate types created and cleans up the source as all uses left of force_fit_type are of the form
t = build_int_cst_wide (type, low, high); t = force_fit_type (t, -1, overflow | TREE_OVERFLOW (arg1), TREE_CONSTANT_OVERFLOW (arg1));
which first creates a shared integer node (of possibly uncanonicalized form) and then truncates it properly and propagates overflow flags. Combining this two steps also allows to adjust int_const_binop to produce less garbage on overflow.
Bootstrapped and tested on i686-pc-linux-gnu, another on on x86_64-unknown-linux-gnu for all languages still running.
Finished and applied to mainline (with the #if 0 / #endif block removed - thanks Ian ;)
2007-01-08 Richard Guenther <rguenther@suse.de>
* tree.h (force_fit_type_double): Export. (force_fit_type): Remove. * fold-const.c (force_fit_type_double): New function. (force_fit_type): Remove. (int_const_binop): Use it. (fold_convert_const_int_from_int): Likewise. (fold_convert_const_int_from_real): Likewise. (fold_div_compare): Likewise. (fold_sign_changed_comparison): Likewise. (fold_unary): Likewise. (fold_negate_const): Likewise. (fold_abs_const): Likewise. (fold_not_const): Likewise. * c-common.c (shorten_compare): Use force_fit_type_double. * convert.c (convert_to_pointer): Likewise.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |