diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2000-03-07 11:41:32 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2000-03-07 06:41:32 -0500 |
commit | 05bccae2efd712562a20afadfc2889d87323e7ca (patch) | |
tree | eedf389b906e1f6d1fda0e405c46b8b47fb6d064 /gcc/tree.h | |
parent | ddf0fc6c9f1eb8747c9cf6b69e48f11f779632d2 (diff) | |
download | gcc-05bccae2efd712562a20afadfc2889d87323e7ca.zip gcc-05bccae2efd712562a20afadfc2889d87323e7ca.tar.gz gcc-05bccae2efd712562a20afadfc2889d87323e7ca.tar.bz2 |
tree.h (INT_CST_LT, [...]): Remove unneeded casts.
* tree.h (INT_CST_LT, INT_CST_LT_UNSIGNED): Remove unneeded casts.
(struct tree_int_cst): int_cst_low is now unsigned HOST_WIDE_INT.
(attribute_hash_list, type_hash_canon): hashcode is now unsigned.
(type_hash_lookup, type_hash_add, type_hash_list): Likewise.
(min_precision): Result is unsignd.
(add_double, neg_double, mul_double): Low word is unsigned.
(lshift_double, rshift_double, lrotate_double): Likewise.
(rrotate_double, div_and_round_double): Likewise.
(tree_floor_log2, compare_tree_int): New functions.
(preserve_rtl_expr_temps): New declaration.
* c-common.c (declare_hidden_char_array): Use compare_tree_int.
(decl_attributes): Use tree_log2 to find alignment.
Check for TREE_INT_CST_HIGH for format args.
(min_precision): Now unsigned.
Use tree_floor_log2.
(truthvalue_conversion): Delete long-disabled code.
* c-decl.c (finish_struct): Clean up tests on field width.
(finish_function): Use compare_tree_int.
* c-pragma.c (handle_pragma_token): Use tree_log2 for alignment.
* c-typeck.c (comptypes): Use tree_int_cst_equal.
(default_conversion, digest_init): Use compare_tree_int.
(build_binary_op): Use integer_all_onesp and compare_tree_int.
Fix type errors in forming masks.
* calls.c (initialize_argument_information): Use compare_tree_int.
* dbxout.c (dbxout_type): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
* except.c (expand_eh_region_start_tree): Use compare_tree_int.
* expr.c (is_zeros_p, case INTEGER_CST): Use integer_zerop.
(store_field): Use compare_tree_int.
(expand_expr, case CONSTRUCTOR): Use TYPE_SIZE_UNIT.
(expand_expr, case ARRAY_REF): Use compare_tree_int.
(do_jump, case BIT_AND_EXPR): Use tree_floor_log2.
(do_store_flag): Use compare_tree_int.
* fold-const.c (encode, decode): Low part is always unsigned.
(force_fit_type, add_double, neg_double, mul_double): Likewise.
(lshift_double, rshift_double, lrotate_double): Likewise.
(rrotate_double, div_and_round_double, int_const_binop): Likewise.
(fold_convert): Use compare_tree_int.
(operand_equal_p, case INTEGER_CST): Use tree_int_cst_equal.
(invert_truthvalue, case INTEGER_CST): Likewise.
(fold): Use compare_tree_int; add casts for unsigned TREE_INT_CST_LOW.
* mkdeps.c (deps_dummy_targets): Make I unsigned.
* rtl.h (add_double, neg_double, mul_double): Low words are unsigned.
(lshift_double, rshift_double, lrotate_double, rrotate_double):
Likewise.
* stmt.c (expand_decl): Use compare_tree_int and mode_for_size_tree.
(expand_end_case): Use compare_tree_int.
(estimate_case_costs): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
* stor-layout.c (mode_for_size_tree): Use compare_tree_int.
(layout_decl): Likewise.
(layout_record, layout_union): Make sizes unsigned.
(layout_type, case VOID_TYPE): TYPE_SIZE must be bitsizetype.
(layout_type, case QUAL_UNION_TYPE): Use compare_tree_int.
* tree.c (struct type_hash): hashcode is unsigned.
(build_type_attribute_variant, type_hash_list): Likewise.
(type_hash_lookup, type_hash_add, type_hash_canon): Likewise.
(attribute_hash_list, build_array_type, build_method_type): Likewise.
(build_complex_type): Likewise.
(real_value_from_int_cst): Remove unneeded casts.
(integer_all_onesp): Add casts.
(tree_floor_log2, compare_tree_int): New functions.
(build_index_type): Use tree_int_cst_sgn.
* varasm.c (assemble_variable): Use compare_tree_int.
* ch/actions.c (chill_convert_for_assignment): INDEX is unsigned
HOST_WIDE_INT.
* ch/ch-tree.h (DECL_NESTING_LEVEL): Use TREE_INT_CST_HIGH
since unsigned.
* ch/except.c (chill_handle_on_labels): ALTERNATIVE is unsigned.
Use compare_tree_int.
(expand_goto_except_cleanup): Likewise.
* cp/class.c (dfs_modify_vtables): I is now unsigned.
(check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
(build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
* cp/error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
* cp/init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
* cp/method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
* cp/typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
Call integer_all_onesp.
* cp/typeck2.c (process_init_constructor): Use compare_tree_int.
* f/com.c (ffecom_f2c_set_lio_code_): Use compare_tree_int.
(ffecom_sym_transform_, ffecom_transform_common_): Likewise.
(ffecom_transform_equiv_): Likewise.
* java/decl.c (emit_init_test_initialization): Mark KEY as unused.
* java/expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
(build_anewarray): Likewise.
* java/parse.y (patch_newarray): Likewise.
* java/parse.c: Regenerated.
From-SVN: r32383
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 87 |
1 files changed, 49 insertions, 38 deletions
@@ -630,23 +630,21 @@ extern void tree_class_check_failed PARAMS ((const tree, char, #define INT_CST_LT(A, B) \ (TREE_INT_CST_HIGH (A) < TREE_INT_CST_HIGH (B) \ || (TREE_INT_CST_HIGH (A) == TREE_INT_CST_HIGH (B) \ - && ((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (A) \ - < (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (B)))) + && TREE_INT_CST_LOW (A) < TREE_INT_CST_LOW (B))) #define INT_CST_LT_UNSIGNED(A, B) \ (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \ < (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \ || (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \ - == (unsigned HOST_WIDE_INT ) TREE_INT_CST_HIGH (B)) \ - && (((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (A) \ - < (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (B))))) + == (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \ + && TREE_INT_CST_LOW (A) < TREE_INT_CST_LOW (B))) struct tree_int_cst { char common[sizeof (struct tree_common)]; struct rtx_def *rtl; /* acts as link to register transfer language (rtl) info */ - HOST_WIDE_INT int_cst_low; + unsigned HOST_WIDE_INT int_cst_low; HOST_WIDE_INT int_cst_high; }; @@ -1698,7 +1696,7 @@ extern tree array_type_nelts PARAMS ((tree)); extern tree value_member PARAMS ((tree, tree)); extern tree purpose_member PARAMS ((tree, tree)); extern tree binfo_member PARAMS ((tree, tree)); -extern int attribute_hash_list PARAMS ((tree)); +extern unsigned int attribute_hash_list PARAMS ((tree)); extern int attribute_list_equal PARAMS ((tree, tree)); extern int attribute_list_contained PARAMS ((tree, tree)); extern int tree_int_cst_equal PARAMS ((tree, tree)); @@ -1787,7 +1785,7 @@ extern void layout_type PARAMS ((tree)); How the hash code is computed is up to the caller, as long as any two callers that could hash identical-looking type nodes agree. */ -extern tree type_hash_canon PARAMS ((int, tree)); +extern tree type_hash_canon PARAMS ((unsigned int, tree)); /* Given a VAR_DECL, PARM_DECL, RESULT_DECL or FIELD_DECL node, calculates the DECL_SIZE, DECL_SIZE_UNIT, DECL_ALIGN and DECL_MODE @@ -2218,26 +2216,34 @@ extern int stmt_loop_nest_empty PARAMS ((void)); extern tree fold PARAMS ((tree)); extern int force_fit_type PARAMS ((tree, int)); -extern int add_double PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT *, HOST_WIDE_INT *)); -extern int neg_double PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT *, HOST_WIDE_INT *)); -extern int mul_double PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT *, HOST_WIDE_INT *)); -extern void lshift_double PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT, int, HOST_WIDE_INT *, - HOST_WIDE_INT *, int)); -extern void rshift_double PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT, int, - HOST_WIDE_INT *, HOST_WIDE_INT *, int)); -extern void lrotate_double PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT, int, HOST_WIDE_INT *, - HOST_WIDE_INT *)); -extern void rrotate_double PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT, int, HOST_WIDE_INT *, - HOST_WIDE_INT *)); +extern int add_double PARAMS ((unsigned HOST_WIDE_INT, HOST_WIDE_INT, + unsigned HOST_WIDE_INT, HOST_WIDE_INT, + unsigned HOST_WIDE_INT *, + HOST_WIDE_INT *)); +extern int neg_double PARAMS ((unsigned HOST_WIDE_INT, HOST_WIDE_INT, + unsigned HOST_WIDE_INT *, + HOST_WIDE_INT *)); +extern int mul_double PARAMS ((unsigned HOST_WIDE_INT, + HOST_WIDE_INT, + unsigned HOST_WIDE_INT, HOST_WIDE_INT, + unsigned HOST_WIDE_INT *, + HOST_WIDE_INT *)); +extern void lshift_double PARAMS ((unsigned HOST_WIDE_INT, HOST_WIDE_INT, + HOST_WIDE_INT, unsigned int, + unsigned HOST_WIDE_INT *, + HOST_WIDE_INT *, int)); +extern void rshift_double PARAMS ((unsigned HOST_WIDE_INT, HOST_WIDE_INT, + HOST_WIDE_INT, unsigned int, + unsigned HOST_WIDE_INT *, + HOST_WIDE_INT *, int)); +extern void lrotate_double PARAMS ((unsigned HOST_WIDE_INT, HOST_WIDE_INT, + HOST_WIDE_INT, unsigned int, + unsigned HOST_WIDE_INT *, + HOST_WIDE_INT *)); +extern void rrotate_double PARAMS ((unsigned HOST_WIDE_INT, HOST_WIDE_INT, + HOST_WIDE_INT, unsigned int, + unsigned HOST_WIDE_INT *, + HOST_WIDE_INT *)); extern int operand_equal_p PARAMS ((tree, tree, int)); extern tree invert_truthvalue PARAMS ((tree)); @@ -2394,19 +2400,21 @@ extern tree get_file_function_name PARAMS ((int)); extern void set_identifier_size PARAMS ((int)); extern int int_fits_type_p PARAMS ((tree, tree)); extern int tree_log2 PARAMS ((tree)); +extern int tree_floor_log2 PARAMS ((tree)); extern void preserve_initializer PARAMS ((void)); extern void preserve_data PARAMS ((void)); extern int object_permanent_p PARAMS ((tree)); extern int type_precision PARAMS ((tree)); extern int simple_cst_equal PARAMS ((tree, tree)); +extern int compare_tree_int PARAMS ((tree, unsigned int)); extern int type_list_equal PARAMS ((tree, tree)); extern int chain_member PARAMS ((tree, tree)); extern int chain_member_purpose PARAMS ((tree, tree)); extern int chain_member_value PARAMS ((tree, tree)); extern tree listify PARAMS ((tree)); -extern tree type_hash_lookup PARAMS ((int, tree)); -extern void type_hash_add PARAMS ((int, tree)); -extern int type_hash_list PARAMS ((tree)); +extern tree type_hash_lookup PARAMS ((unsigned int, tree)); +extern void type_hash_add PARAMS ((unsigned int, tree)); +extern unsigned int type_hash_list PARAMS ((tree)); extern int simple_cst_list_equal PARAMS ((tree, tree)); extern void debug_obstack PARAMS ((char *)); extern void rtl_in_current_obstack PARAMS ((void)); @@ -2449,6 +2457,7 @@ extern void free_temp_slots PARAMS ((void)); extern void pop_temp_slots PARAMS ((void)); extern void push_temp_slots PARAMS ((void)); extern void preserve_temp_slots PARAMS ((struct rtx_def *)); +extern void preserve_rtl_expr_temps PARAMS ((tree)); extern int aggregate_value_p PARAMS ((tree)); extern tree reorder_blocks PARAMS ((tree, struct rtx_def *)); @@ -2505,7 +2514,7 @@ extern void print_lang_statistics PARAMS ((void)); /* In c-common.c */ extern tree truthvalue_conversion PARAMS ((tree)); -extern int min_precision PARAMS ((tree, int)); +extern unsigned int min_precision PARAMS ((tree, int)); extern void split_specs_attrs PARAMS ((tree, tree *, tree *)); /* In c-decl.c */ @@ -2537,12 +2546,14 @@ extern void variable_section PARAMS ((tree, int)); /* In fold-const.c */ extern int div_and_round_double PARAMS ((enum tree_code, int, - HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT, HOST_WIDE_INT, - HOST_WIDE_INT *, - HOST_WIDE_INT *, - HOST_WIDE_INT *, - HOST_WIDE_INT *)); + unsigned HOST_WIDE_INT, + HOST_WIDE_INT, + unsigned HOST_WIDE_INT, + HOST_WIDE_INT, + unsigned HOST_WIDE_INT *, + HOST_WIDE_INT *, + unsigned HOST_WIDE_INT *, + HOST_WIDE_INT *)); /* In stmt.c */ extern void emit_nop PARAMS ((void)); |