[PATCH] Add bult_int_cst_wide_type, use build_int_cst_type more
Richard Guenther
richard.guenther@gmail.com
Mon Jan 8 20:31:00 GMT 2007
This patch removes all of the
mask = build_int_cst (unsigned_type, -1);
mask = force_fit_type (mask, 0, false, false);
idiom uses by either using the existing build_int_cst_type or the new
build_int_cst_wide_type. This saves a tree node and a line of source.
Bootstrapped and tested on i686-pc-linux-gnu, another one including
all languages still running.
Richard.
2007-01-08 Richard Guenther <rguenther@suse.de>
* tree.h (build_int_cst_wide_type): Export.
* tree.c (build_int_cst_wide_type): New function.
(build_int_cst_wide): Fix comment.
* builtins.c (fold_builtin_object_size): Use build_int_cst
to build -1 or 0 of the correct type. Use fit_double_type
to check for overflow.
* fold-const.c (optimize_bit_field_compare): Use build_int_cst_type
to build the mask.
(decode_field_reference): Likewise.
(all_ones_mask_p): Likewise.
(native_interpret_int): Use build_int_cst_wide_type.
(fold_binary): Use build_int_cst_type to build an all-ones
value.
* stor-layout.c (set_sizetype): Use build_int_cst_wide_type.
java/
* lex.c (do_java_lex): Use build_int_cst_wide_type.
* jcf-parse.c (get_constant): Likewise.
cp/
* cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
ada/
* cuintp.c (build_cst_from_int): Use built_int_cst_type.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p3.diff
Type: text/x-patch
Size: 15323 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070108/d97da903/attachment.bin>
More information about the Gcc-patches
mailing list