From cc269bb6d9f1538870dc94bc3b8cad8f749d1204 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 18 Nov 2013 14:51:26 +0000 Subject: decl.c, [...]: Replace host_integerp (..., 1) with tree_fits_uhwi_p throughout. gcc/ada/ * gcc-interface/decl.c, gcc-interface/misc.c, gcc-interface/utils.c: Replace host_integerp (..., 1) with tree_fits_uhwi_p throughout. gcc/c-family/ * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace host_integerp (..., 1) with tree_fits_uhwi_p throughout. gcc/cp/ * decl.c: Replace host_integerp (..., 1) with tree_fits_uhwi_p throughout. gcc/ * builtins.c, config/alpha/alpha.c, config/iq2000/iq2000.c, config/mips/mips.c, dbxout.c, dwarf2out.c, expr.c, fold-const.c, gimple-fold.c, godump.c, omp-low.c, predict.c, sdbout.c, stor-layout.c, tree-dfa.c, tree-sra.c, tree-ssa-forwprop.c, tree-ssa-loop-prefetch.c, tree-ssa-phiopt.c, tree-ssa-sccvn.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-vect-data-refs.c, tree-vect-patterns.c, tree.c, varasm.c, alias.c, cfgexpand.c, config/aarch64/aarch64.c, config/arm/arm.c, config/epiphany/epiphany.c, config/i386/i386.c, config/m32c/m32c-pragma.c, config/mep/mep-pragma.c, config/rs6000/rs6000.c, config/sparc/sparc.c, emit-rtl.c, function.c, gimplify.c, ipa-prop.c, stmt.c, trans-mem.c, tree-cfg.c, tree-object-size.c, tree-ssa-ccp.c, tree-ssa-loop-ivcanon.c, tree-stdarg.c, tree-switch-conversion.c, tree-vect-generic.c, tree-vrp.c, tsan.c, ubsan.c: Replace host_integerp (..., 1) with tree_fits_uhwi_p throughout. From-SVN: r204956 --- gcc/ada/gcc-interface/utils.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'gcc/ada/gcc-interface/utils.c') diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 01a6028..4588c52 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -806,7 +806,7 @@ make_packable_type (tree type, bool in_record) /* Do not try to shrink the size if the RM size is not constant. */ if (TYPE_CONTAINS_TEMPLATE_P (type) - || !host_integerp (TYPE_ADA_SIZE (type), 1)) + || !tree_fits_uhwi_p (TYPE_ADA_SIZE (type))) return type; /* Round the RM size up to a unit boundary to get the minimal size @@ -832,7 +832,7 @@ make_packable_type (tree type, bool in_record) if (RECORD_OR_UNION_TYPE_P (new_field_type) && !TYPE_FAT_POINTER_P (new_field_type) - && host_integerp (TYPE_SIZE (new_field_type), 1)) + && tree_fits_uhwi_p (TYPE_SIZE (new_field_type))) new_field_type = make_packable_type (new_field_type, true); /* However, for the last field in a not already packed record type @@ -915,7 +915,7 @@ make_type_from_size (tree type, tree size_tree, bool for_biased) /* If size indicates an error, just return TYPE to avoid propagating the error. Likewise if it's too large to represent. */ - if (!size_tree || !host_integerp (size_tree, 1)) + if (!size_tree || !tree_fits_uhwi_p (size_tree)) return type; size = tree_low_cst (size_tree, 1); @@ -1741,7 +1741,7 @@ rest_of_record_type_compilation (tree record_type) if (!pos && TREE_CODE (curpos) == MULT_EXPR - && host_integerp (TREE_OPERAND (curpos, 1), 1)) + && tree_fits_uhwi_p (TREE_OPERAND (curpos, 1))) { tree offset = TREE_OPERAND (curpos, 0); align = tree_low_cst (TREE_OPERAND (curpos, 1), 1); @@ -1751,7 +1751,7 @@ rest_of_record_type_compilation (tree record_type) } else if (!pos && TREE_CODE (curpos) == PLUS_EXPR - && host_integerp (TREE_OPERAND (curpos, 1), 1) + && tree_fits_uhwi_p (TREE_OPERAND (curpos, 1)) && TREE_CODE (TREE_OPERAND (curpos, 0)) == MULT_EXPR && host_integerp (TREE_OPERAND (TREE_OPERAND (curpos, 0), 1), 1)) @@ -2377,7 +2377,7 @@ create_field_decl (tree field_name, tree field_type, tree record_type, that an alignment of 0 is taken as infinite. */ unsigned int known_align; - if (host_integerp (pos, 1)) + if (tree_fits_uhwi_p (pos)) known_align = tree_low_cst (pos, 1) & - tree_low_cst (pos, 1); else known_align = BITS_PER_UNIT; @@ -2388,7 +2388,7 @@ create_field_decl (tree field_name, tree field_type, tree record_type, layout_decl (field_decl, known_align); SET_DECL_OFFSET_ALIGN (field_decl, - host_integerp (pos, 1) ? BIGGEST_ALIGNMENT + tree_fits_uhwi_p (pos) ? BIGGEST_ALIGNMENT : BITS_PER_UNIT); pos_from_bit (&DECL_FIELD_OFFSET (field_decl), &DECL_FIELD_BIT_OFFSET (field_decl), @@ -2548,7 +2548,7 @@ invalidate_global_renaming_pointers (void) bool value_factor_p (tree value, HOST_WIDE_INT factor) { - if (host_integerp (value, 1)) + if (tree_fits_uhwi_p (value)) return tree_low_cst (value, 1) % factor == 0; if (TREE_CODE (value) == MULT_EXPR) @@ -2608,14 +2608,14 @@ potential_alignment_gap (tree prev_field, tree curr_field, tree offset) /* If the distance between the end of prev_field and the beginning of curr_field is constant, then there is a gap if the value of this constant is not null. */ - if (offset && host_integerp (offset, 1)) + if (offset && tree_fits_uhwi_p (offset)) return !integer_zerop (offset); /* If the size and position of the previous field are constant, then check the sum of this size and position. There will be a gap iff it is not multiple of the current field alignment. */ - if (host_integerp (DECL_SIZE (prev_field), 1) - && host_integerp (bit_position (prev_field), 1)) + if (tree_fits_uhwi_p (DECL_SIZE (prev_field)) + && tree_fits_uhwi_p (bit_position (prev_field))) return ((tree_low_cst (bit_position (prev_field), 1) + tree_low_cst (DECL_SIZE (prev_field), 1)) % DECL_ALIGN (curr_field) != 0); @@ -6302,7 +6302,7 @@ handle_vector_size_attribute (tree *node, tree name, tree args, size = TREE_VALUE (args); - if (!host_integerp (size, 1)) + if (!tree_fits_uhwi_p (size)) { warning (OPT_Wattributes, "%qs attribute ignored", IDENTIFIER_POINTER (name)); @@ -6334,7 +6334,7 @@ handle_vector_size_attribute (tree *node, tree name, tree args, || (!SCALAR_FLOAT_MODE_P (orig_mode) && GET_MODE_CLASS (orig_mode) != MODE_INT && !ALL_SCALAR_FIXED_POINT_MODE_P (orig_mode)) - || !host_integerp (TYPE_SIZE_UNIT (type), 1) + || !tree_fits_uhwi_p (TYPE_SIZE_UNIT (type)) || TREE_CODE (type) == BOOLEAN_TYPE) { error ("invalid vector type for attribute %qs", @@ -6403,7 +6403,7 @@ handle_vector_type_attribute (tree *node, tree name, tree ARG_UNUSED (args), bases, and this attribute is for binding implementors, not end-users, so we should never get there from legitimate explicit uses. */ - if (!host_integerp (rep_size, 1)) + if (!tree_fits_uhwi_p (rep_size)) return NULL_TREE; /* Get the element type/mode and check this is something we know @@ -6418,7 +6418,7 @@ handle_vector_type_attribute (tree *node, tree name, tree ARG_UNUSED (args), || (!SCALAR_FLOAT_MODE_P (elem_mode) && GET_MODE_CLASS (elem_mode) != MODE_INT && !ALL_SCALAR_FIXED_POINT_MODE_P (elem_mode)) - || !host_integerp (TYPE_SIZE_UNIT (elem_type), 1)) + || !tree_fits_uhwi_p (TYPE_SIZE_UNIT (elem_type))) { error ("invalid element type for attribute %qs", IDENTIFIER_POINTER (name)); -- cgit v1.1