Commit 3e95a7cb by Zack Weinberg

rtl.h (plus_constant): Delete.

	* rtl.h (plus_constant): Delete.
	(plus_constant_wide): Rename to plus_constant.
	(plus_constant_for_output_wide): Delete vestigial prototype.
	(GEN_INT): Remove unnecessary cast.
	* tree.h (build_int_2, size_int_type): Delete.
	(build_int_2_wide): Rename to build_int_2.
	(size_int_wide): Rename to size_int_kind.
	(size_int_type_wide): Rename to size_int_type.
	(size_int, ssize_int, bitsize_int, sbitsize_int): Use size_int_kind.
	Remove unnecessary cast.
	* tree.c (build_int_2_wide): Rename build_int_2; update comment.
	* explow.c (plus_constant_wide): Rename plus_constant; update comment.
	* fold-const.c (size_int_wide): Rename size_int_kind. Use size_int_type.
	(size_int_type_wide): Rename size_int_type.
	(int_const_binop): Use size_int_type.
	* c-lex.c (interpret_integer): Use build_int_2.
	* final.c (split_double): Remove unnecessary casts.
	* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Use build_int_2.

From-SVN: r84976
parent 14797075
2004-07-20 Zack Weinberg <zack@codesourcery.com>
* rtl.h (plus_constant): Delete.
(plus_constant_wide): Rename to plus_constant.
(plus_constant_for_output_wide): Delete vestigial prototype.
(GEN_INT): Remove unnecessary cast.
* tree.h (build_int_2, size_int_type): Delete.
(build_int_2_wide): Rename to build_int_2.
(size_int_wide): Rename to size_int_kind.
(size_int_type_wide): Rename to size_int_type.
(size_int, ssize_int, bitsize_int, sbitsize_int): Use size_int_kind.
Remove unnecessary cast.
* tree.c (build_int_2_wide): Rename build_int_2; update comment.
* explow.c (plus_constant_wide): Rename plus_constant; update comment.
* fold-const.c (size_int_wide): Rename size_int_kind. Use size_int_type.
(size_int_type_wide): Rename size_int_type.
(int_const_binop): Use size_int_type.
* c-lex.c (interpret_integer): Use build_int_2.
* final.c (split_double): Remove unnecessary casts.
* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Use build_int_2.
2004-07-20 Richard Henderson <rth@redhat.com> 2004-07-20 Richard Henderson <rth@redhat.com>
* gimplify.c (is_gimple_tmp_var): Move to tree-gimple.c. * gimplify.c (is_gimple_tmp_var): Move to tree-gimple.c.
...@@ -185,7 +206,7 @@ ...@@ -185,7 +206,7 @@
* tree-ssa-dom.c (single_incoming_edge_ignoring_loop_edges): New. * tree-ssa-dom.c (single_incoming_edge_ignoring_loop_edges): New.
(get_eq_expr_value): Use it. Simplify slightly. (get_eq_expr_value): Use it. Simplify slightly.
2004-07-19 Maciej W. Rozycki <macro@linux-mips.org> 2004-07-19 Maciej W. Rozycki <macro@linux-mips.org>
* config/mips/mips.md (mulsidi3_32bit_r4000): Fix the clobber list. * config/mips/mips.md (mulsidi3_32bit_r4000): Fix the clobber list.
...@@ -238,7 +259,7 @@ ...@@ -238,7 +259,7 @@
* config/s390/s390.c (regclass_map initializer): Register 35 added to * config/s390/s390.c (regclass_map initializer): Register 35 added to
ADDR_REGS. ADDR_REGS.
(load_multiple_operation, store_multiple_operation): Removed (load_multiple_operation, store_multiple_operation): Removed
pointless sanity check. pointless sanity check.
(s390_decompose_address): Added check for return_address_pointer_rtx. (s390_decompose_address): Added check for return_address_pointer_rtx.
(s390_return_addr_rtx): Use return_address_pointer_rtx for count == 0. (s390_return_addr_rtx): Use return_address_pointer_rtx for count == 0.
(s390_return_address_offset): New function. (s390_return_address_offset): New function.
...@@ -269,7 +290,7 @@ ...@@ -269,7 +290,7 @@
2004-07-19 Gabriel Dos Reis <gdr@integrable-solution.net> 2004-07-19 Gabriel Dos Reis <gdr@integrable-solution.net>
* doc/sourcebuild.texi: Add libcpp, now that CPP has its own * doc/sourcebuild.texi: Add libcpp, now that CPP has its own
directory. directory.
2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk> 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
......
...@@ -521,7 +521,7 @@ interpret_integer (const cpp_token *token, unsigned int flags) ...@@ -521,7 +521,7 @@ interpret_integer (const cpp_token *token, unsigned int flags)
integer = cpp_interpret_integer (parse_in, token, flags); integer = cpp_interpret_integer (parse_in, token, flags);
integer = cpp_num_sign_extend (integer, options->precision); integer = cpp_num_sign_extend (integer, options->precision);
value = build_int_2_wide (integer.low, integer.high); value = build_int_2 (integer.low, integer.high);
/* The type of a constant with a U suffix is straightforward. */ /* The type of a constant with a U suffix is straightforward. */
if (flags & CPP_N_UNSIGNED) if (flags & CPP_N_UNSIGNED)
......
...@@ -71,12 +71,10 @@ trunc_int_for_mode (HOST_WIDE_INT c, enum machine_mode mode) ...@@ -71,12 +71,10 @@ trunc_int_for_mode (HOST_WIDE_INT c, enum machine_mode mode)
return c; return c;
} }
/* Return an rtx for the sum of X and the integer C. /* Return an rtx for the sum of X and the integer C. */
This function should be used via the `plus_constant' macro. */
rtx rtx
plus_constant_wide (rtx x, HOST_WIDE_INT c) plus_constant (rtx x, HOST_WIDE_INT c)
{ {
RTX_CODE code; RTX_CODE code;
rtx y; rtx y;
......
...@@ -3665,8 +3665,8 @@ split_double (rtx value, rtx *first, rtx *second) ...@@ -3665,8 +3665,8 @@ split_double (rtx value, rtx *first, rtx *second)
} }
#endif #endif
*first = GEN_INT ((HOST_WIDE_INT) l[0]); *first = GEN_INT (l[0]);
*second = GEN_INT ((HOST_WIDE_INT) l[1]); *second = GEN_INT (l[1]);
} }
} }
......
...@@ -1398,7 +1398,7 @@ int_const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc) ...@@ -1398,7 +1398,7 @@ int_const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc)
&& ((hi == 0 && (HOST_WIDE_INT) low >= 0) && ((hi == 0 && (HOST_WIDE_INT) low >= 0)
|| (hi == -1 && (HOST_WIDE_INT) low < 0)) || (hi == -1 && (HOST_WIDE_INT) low < 0))
&& overflow == 0 && ! TREE_OVERFLOW (arg1) && ! TREE_OVERFLOW (arg2)) && overflow == 0 && ! TREE_OVERFLOW (arg1) && ! TREE_OVERFLOW (arg2))
return size_int_type_wide (low, type); return size_int_type (low, type);
else else
{ {
t = build_int_2 (low, hi); t = build_int_2 (low, hi);
...@@ -1602,9 +1602,9 @@ size_htab_eq (const void *x, const void *y) ...@@ -1602,9 +1602,9 @@ size_htab_eq (const void *x, const void *y)
bits are given by NUMBER and of the sizetype represented by KIND. */ bits are given by NUMBER and of the sizetype represented by KIND. */
tree tree
size_int_wide (HOST_WIDE_INT number, enum size_type_kind kind) size_int_kind (HOST_WIDE_INT number, enum size_type_kind kind)
{ {
return size_int_type_wide (number, sizetype_tab[(int) kind]); return size_int_type (number, sizetype_tab[(int) kind]);
} }
/* Likewise, but the desired type is specified explicitly. */ /* Likewise, but the desired type is specified explicitly. */
...@@ -1614,7 +1614,7 @@ static GTY ((if_marked ("ggc_marked_p"), param_is (union tree_node))) ...@@ -1614,7 +1614,7 @@ static GTY ((if_marked ("ggc_marked_p"), param_is (union tree_node)))
htab_t size_htab; htab_t size_htab;
tree tree
size_int_type_wide (HOST_WIDE_INT number, tree type) size_int_type (HOST_WIDE_INT number, tree type)
{ {
void **slot; void **slot;
...@@ -1751,7 +1751,7 @@ fold_convert_const (enum tree_code code, tree type, tree arg1) ...@@ -1751,7 +1751,7 @@ fold_convert_const (enum tree_code code, tree type, tree arg1)
if (TREE_CODE (type) == INTEGER_TYPE && TYPE_IS_SIZETYPE (type) if (TREE_CODE (type) == INTEGER_TYPE && TYPE_IS_SIZETYPE (type)
&& !TREE_CONSTANT_OVERFLOW (arg1) && !TREE_CONSTANT_OVERFLOW (arg1)
&& compare_tree_int (arg1, 10000) < 0) && compare_tree_int (arg1, 10000) < 0)
return size_int_type_wide (TREE_INT_CST_LOW (arg1), type); return size_int_type (TREE_INT_CST_LOW (arg1), type);
/* Given an integer constant, make new constant with new type, /* Given an integer constant, make new constant with new type,
appropriately sign-extended or truncated. */ appropriately sign-extended or truncated. */
......
...@@ -1564,8 +1564,6 @@ extern int generating_concat_p; ...@@ -1564,8 +1564,6 @@ extern int generating_concat_p;
/* In expmed.c */ /* In expmed.c */
extern int ceil_log2 (unsigned HOST_WIDE_INT); extern int ceil_log2 (unsigned HOST_WIDE_INT);
#define plus_constant(X, C) plus_constant_wide ((X), (HOST_WIDE_INT) (C))
/* In builtins.c */ /* In builtins.c */
extern rtx expand_builtin_expect_jump (tree, rtx, rtx); extern rtx expand_builtin_expect_jump (tree, rtx, rtx);
extern void purge_builtin_constant_p (void); extern void purge_builtin_constant_p (void);
...@@ -1573,8 +1571,7 @@ extern void purge_builtin_constant_p (void); ...@@ -1573,8 +1571,7 @@ extern void purge_builtin_constant_p (void);
/* In explow.c */ /* In explow.c */
extern void set_stack_check_libfunc (rtx); extern void set_stack_check_libfunc (rtx);
extern HOST_WIDE_INT trunc_int_for_mode (HOST_WIDE_INT, enum machine_mode); extern HOST_WIDE_INT trunc_int_for_mode (HOST_WIDE_INT, enum machine_mode);
extern rtx plus_constant_wide (rtx, HOST_WIDE_INT); extern rtx plus_constant (rtx, HOST_WIDE_INT);
extern rtx plus_constant_for_output_wide (rtx, HOST_WIDE_INT);
extern void optimize_save_area_alloca (void); extern void optimize_save_area_alloca (void);
/* In emit-rtl.c */ /* In emit-rtl.c */
...@@ -2019,9 +2016,7 @@ extern rtx gen_rtx_REG (enum machine_mode, unsigned); ...@@ -2019,9 +2016,7 @@ extern rtx gen_rtx_REG (enum machine_mode, unsigned);
extern rtx gen_rtx_SUBREG (enum machine_mode, rtx, int); extern rtx gen_rtx_SUBREG (enum machine_mode, rtx, int);
extern rtx gen_rtx_MEM (enum machine_mode, rtx); extern rtx gen_rtx_MEM (enum machine_mode, rtx);
/* We need the cast here to ensure that we get the same result both with #define GEN_INT(N) gen_rtx_CONST_INT (VOIDmode, (N))
and without prototypes. */
#define GEN_INT(N) gen_rtx_CONST_INT (VOIDmode, (HOST_WIDE_INT) (N))
/* Virtual registers are used during RTL generation to refer to locations into /* Virtual registers are used during RTL generation to refer to locations into
the stack frame when the actual location isn't known until RTL generation the stack frame when the actual location isn't known until RTL generation
......
...@@ -1551,7 +1551,7 @@ maybe_fold_offset_to_array_ref (tree base, tree offset, tree orig_type) ...@@ -1551,7 +1551,7 @@ maybe_fold_offset_to_array_ref (tree base, tree offset, tree orig_type)
|| lrem || hrem) || lrem || hrem)
return NULL_TREE; return NULL_TREE;
idx = build_int_2_wide (lquo, hquo); idx = build_int_2 (lquo, hquo);
} }
/* Assume the low bound is zero. If there is a domain type, get the /* Assume the low bound is zero. If there is a domain type, get the
......
...@@ -422,12 +422,10 @@ copy_list (tree list) ...@@ -422,12 +422,10 @@ copy_list (tree list)
/* Return a newly constructed INTEGER_CST node whose constant value /* Return a newly constructed INTEGER_CST node whose constant value
is specified by the two ints LOW and HI. is specified by the two ints LOW and HI.
The TREE_TYPE is set to `int'. The TREE_TYPE is set to `int'. */
This function should be used via the `build_int_2' macro. */
tree tree
build_int_2_wide (unsigned HOST_WIDE_INT low, HOST_WIDE_INT hi) build_int_2 (unsigned HOST_WIDE_INT low, HOST_WIDE_INT hi)
{ {
tree t = make_node (INTEGER_CST); tree t = make_node (INTEGER_CST);
......
...@@ -2677,9 +2677,6 @@ extern tree maybe_get_identifier (const char *); ...@@ -2677,9 +2677,6 @@ extern tree maybe_get_identifier (const char *);
/* Construct various types of nodes. */ /* Construct various types of nodes. */
#define build_int_2(LO, HI) \
build_int_2_wide ((unsigned HOST_WIDE_INT) (LO), (HOST_WIDE_INT) (HI))
extern tree build (enum tree_code, tree, ...); extern tree build (enum tree_code, tree, ...);
extern tree build_nt (enum tree_code, ...); extern tree build_nt (enum tree_code, ...);
...@@ -2707,7 +2704,7 @@ extern tree build4_stat (enum tree_code, tree, tree, tree, tree, ...@@ -2707,7 +2704,7 @@ extern tree build4_stat (enum tree_code, tree, tree, tree, tree,
tree MEM_STAT_DECL); tree MEM_STAT_DECL);
#define build4(c,t1,t2,t3,t4,t5) build4_stat (c,t1,t2,t3,t4,t5 MEM_STAT_INFO) #define build4(c,t1,t2,t3,t4,t5) build4_stat (c,t1,t2,t3,t4,t5 MEM_STAT_INFO)
extern tree build_int_2_wide (unsigned HOST_WIDE_INT, HOST_WIDE_INT); extern tree build_int_2 (unsigned HOST_WIDE_INT, HOST_WIDE_INT);
extern tree build_vector (tree, tree); extern tree build_vector (tree, tree);
extern tree build_constructor (tree, tree); extern tree build_constructor (tree, tree);
extern tree build_real_from_int_cst (tree, tree); extern tree build_real_from_int_cst (tree, tree);
...@@ -3049,14 +3046,13 @@ extern GTY(()) tree sizetype_tab[(int) TYPE_KIND_LAST]; ...@@ -3049,14 +3046,13 @@ extern GTY(()) tree sizetype_tab[(int) TYPE_KIND_LAST];
extern tree size_binop (enum tree_code, tree, tree); extern tree size_binop (enum tree_code, tree, tree);
extern tree size_diffop (tree, tree); extern tree size_diffop (tree, tree);
extern tree size_int_wide (HOST_WIDE_INT, enum size_type_kind); extern tree size_int_kind (HOST_WIDE_INT, enum size_type_kind);
extern tree size_int_type_wide (HOST_WIDE_INT, tree); extern tree size_int_type (HOST_WIDE_INT, tree);
#define size_int_type(L, T) size_int_type_wide ((HOST_WIDE_INT) (L), T) #define size_int(L) size_int_kind (L, SIZETYPE)
#define size_int(L) size_int_wide ((HOST_WIDE_INT) (L), SIZETYPE) #define ssize_int(L) size_int_kind (L, SSIZETYPE)
#define ssize_int(L) size_int_wide ((HOST_WIDE_INT) (L), SSIZETYPE) #define bitsize_int(L) size_int_kind (L, BITSIZETYPE)
#define bitsize_int(L) size_int_wide ((HOST_WIDE_INT) (L), BITSIZETYPE) #define sbitsize_int(L) size_int_kind (L, SBITSIZETYPE)
#define sbitsize_int(L) size_int_wide ((HOST_WIDE_INT) (L), SBITSIZETYPE)
extern tree round_up (tree, int); extern tree round_up (tree, int);
extern tree round_down (tree, int); extern tree round_down (tree, int);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment