]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc/ada/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Nov 2013 14:51:10 +0000 (14:51 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Nov 2013 14:51:10 +0000 (14:51 +0000)
* gcc-interface/cuintp.c: Replace host_integerp (..., 0) with
tree_fits_shwi_p throughout.

gcc/c-family/
* c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
host_integerp (..., 0) with tree_fits_shwi_p throughout.

gcc/c/
* c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
throughout.

gcc/cp/
* error.c, init.c, parser.c, semantics.c: Replace
host_integerp (..., 0) with tree_fits_shwi_p throughout.

gcc/go/
* gofrontend/expressions.cc: Replace host_integerp (..., 0) with
tree_fits_shwi_p throughout.

gcc/java/
* class.c, expr.c: Replace host_integerp (..., 0) with
tree_fits_shwi_p throughout.

gcc/
* builtins.c, config/alpha/alpha.c, config/c6x/predicates.md,
config/ia64/predicates.md, config/iq2000/iq2000.c, config/mips/mips.c,
config/s390/s390.c, dbxout.c, dwarf2out.c, except.c, explow.c, expr.c,
expr.h, fold-const.c, gimple-fold.c, gimple-ssa-strength-reduction.c,
gimple.c, godump.c, graphite-scop-detection.c, graphite-sese-to-poly.c,
omp-low.c, predict.c, rtlanal.c, sdbout.c, simplify-rtx.c,
stor-layout.c, tree-data-ref.c, tree-dfa.c, tree-pretty-print.c,
tree-sra.c, tree-ssa-alias.c, tree-ssa-forwprop.c,
tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c,
tree-ssa-phiopt.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c,
tree-ssa-strlen.c, tree-ssa-structalias.c, tree-vect-data-refs.c,
tree-vect-patterns.c, tree-vectorizer.h, tree.c, var-tracking.c,
varasm.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
throughout.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204955 138bc75d-0d04-0410-961f-82ee72b054a4

66 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gcc-interface/cuintp.c
gcc/builtins.c
gcc/c-family/ChangeLog
gcc/c-family/c-ada-spec.c
gcc/c-family/c-common.c
gcc/c-family/c-format.c
gcc/c-family/c-pretty-print.c
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/config/alpha/alpha.c
gcc/config/c6x/predicates.md
gcc/config/ia64/predicates.md
gcc/config/iq2000/iq2000.c
gcc/config/mips/mips.c
gcc/config/s390/s390.c
gcc/cp/ChangeLog
gcc/cp/error.c
gcc/cp/init.c
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/dbxout.c
gcc/dwarf2out.c
gcc/except.c
gcc/explow.c
gcc/expr.c
gcc/expr.h
gcc/fold-const.c
gcc/gimple-fold.c
gcc/gimple-ssa-strength-reduction.c
gcc/gimple.c
gcc/go/ChangeLog
gcc/go/gofrontend/expressions.cc
gcc/godump.c
gcc/graphite-scop-detection.c
gcc/graphite-sese-to-poly.c
gcc/java/ChangeLog
gcc/java/class.c
gcc/java/expr.c
gcc/omp-low.c
gcc/predict.c
gcc/rtlanal.c
gcc/sdbout.c
gcc/simplify-rtx.c
gcc/stor-layout.c
gcc/tree-data-ref.c
gcc/tree-dfa.c
gcc/tree-pretty-print.c
gcc/tree-sra.c
gcc/tree-ssa-alias.c
gcc/tree-ssa-forwprop.c
gcc/tree-ssa-loop-ivopts.c
gcc/tree-ssa-loop-prefetch.c
gcc/tree-ssa-math-opts.c
gcc/tree-ssa-phiopt.c
gcc/tree-ssa-reassoc.c
gcc/tree-ssa-sccvn.c
gcc/tree-ssa-strlen.c
gcc/tree-ssa-structalias.c
gcc/tree-vect-data-refs.c
gcc/tree-vect-patterns.c
gcc/tree-vectorizer.h
gcc/tree.c
gcc/var-tracking.c
gcc/varasm.c

index 6ae3a6faf7ff9ad148d7e4e174e99bfc960017ea..48c0d01f8cb405f3dfa87ad6e4bcdd8929b45ce4 100644 (file)
@@ -1,3 +1,20 @@
+2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * builtins.c, config/alpha/alpha.c, config/c6x/predicates.md,
+       config/ia64/predicates.md, config/iq2000/iq2000.c, config/mips/mips.c,
+       config/s390/s390.c, dbxout.c, dwarf2out.c, except.c, explow.c, expr.c,
+       expr.h, fold-const.c, gimple-fold.c, gimple-ssa-strength-reduction.c,
+       gimple.c, godump.c, graphite-scop-detection.c, graphite-sese-to-poly.c,
+       omp-low.c, predict.c, rtlanal.c, sdbout.c, simplify-rtx.c,
+       stor-layout.c, tree-data-ref.c, tree-dfa.c, tree-pretty-print.c,
+       tree-sra.c, tree-ssa-alias.c, tree-ssa-forwprop.c,
+       tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c,
+       tree-ssa-phiopt.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c,
+       tree-ssa-strlen.c, tree-ssa-structalias.c, tree-vect-data-refs.c,
+       tree-vect-patterns.c, tree-vectorizer.h, tree.c, var-tracking.c,
+       varasm.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
+       throughout.
+
 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Declare.
index f6137caeca6f2a00a816c0248f292f2c9d227822..facd5d61ef86f41a348e4c703bcabeacd88e8c0f 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * gcc-interface/cuintp.c: Replace host_integerp (..., 0) with
+       tree_fits_shwi_p throughout.
+
 2013-11-18  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/trans.c (TARGET_ABI_OPEN_VMS): Delete as redundant.
index 9b58b0ecc6420830572581d91446fe794471610f..d3c19aed0e4296ad4427b44fa3459574912a729e 100644 (file)
@@ -153,7 +153,7 @@ UI_From_gnu (tree Input)
   /* On 64-bit hosts, host_integerp tells whether the input fits in a
      signed 64-bit integer.  Then a truncation tells whether it fits
      in a signed 32-bit integer.  */
-  if (host_integerp (Input, 0))
+  if (tree_fits_shwi_p (Input))
     {
       HOST_WIDE_INT hw_input = TREE_INT_CST_LOW (Input);
       if (hw_input == (int) hw_input)
@@ -165,7 +165,7 @@ UI_From_gnu (tree Input)
   /* On 32-bit hosts, host_integerp tells whether the input fits in a
      signed 32-bit integer.  Then a sign test tells whether it fits
      in a signed 64-bit integer.  */
-  if (host_integerp (Input, 0))
+  if (tree_fits_shwi_p (Input))
     return UI_From_Int (TREE_INT_CST_LOW (Input));
   else if (TREE_INT_CST_HIGH (Input) < 0 && TYPE_UNSIGNED (gnu_type))
     return No_Uint;
index 5c8577a8e82b1f7f54251c8d8c85e1e52c164335..7807b60e53963eec011eeb82a7de951075ca6cc1 100644 (file)
@@ -617,7 +617,7 @@ c_strlen (tree src, int only_value)
      a null character if we can represent it as a single HOST_WIDE_INT.  */
   if (offset_node == 0)
     offset = 0;
-  else if (! host_integerp (offset_node, 0))
+  else if (! tree_fits_shwi_p (offset_node))
     offset = -1;
   else
     offset = tree_low_cst (offset_node, 0);
@@ -5288,7 +5288,7 @@ expand_builtin_atomic_compare_exchange (enum machine_mode mode, tree exp,
 
   weak = CALL_EXPR_ARG (exp, 3);
   is_weak = false;
-  if (host_integerp (weak, 0) && tree_low_cst (weak, 0) != 0)
+  if (tree_fits_shwi_p (weak) && tree_low_cst (weak, 0) != 0)
     is_weak = true;
 
   oldval = expect;
@@ -8547,7 +8547,7 @@ fold_builtin_powi (location_t loc, tree fndecl ATTRIBUTE_UNUSED,
   if (real_onep (arg0))
     return omit_one_operand_loc (loc, type, build_real (type, dconst1), arg1);
 
-  if (host_integerp (arg1, 0))
+  if (tree_fits_shwi_p (arg1))
     {
       HOST_WIDE_INT c = TREE_INT_CST_LOW (arg1);
 
@@ -8871,7 +8871,7 @@ fold_builtin_memory_op (location_t loc, tree dest, tree src,
          return NULL_TREE;
        }
 
-      if (!host_integerp (len, 0))
+      if (!tree_fits_shwi_p (len))
        return NULL_TREE;
       /* FIXME:
          This logic lose for arguments like (type *)malloc (sizeof (type)),
@@ -9845,7 +9845,7 @@ fold_builtin_load_exponent (location_t loc, tree arg0, tree arg1,
       /* If both arguments are constant, then try to evaluate it.  */
       if ((ldexp || REAL_MODE_FORMAT (TYPE_MODE (type))->b == 2)
          && TREE_CODE (arg0) == REAL_CST && !TREE_OVERFLOW (arg0)
-         && host_integerp (arg1, 0))
+         && tree_fits_shwi_p (arg1))
         {
          /* Bound the maximum adjustment to twice the range of the
             mode's valid exponents.  Use abs to ensure the range is
@@ -13841,7 +13841,7 @@ do_mpfr_bessel_n (tree arg1, tree arg2, tree type,
   /* To proceed, MPFR must exactly represent the target floating point
      format, which only happens when the target base equals two.  */
   if (REAL_MODE_FORMAT (TYPE_MODE (type))->b == 2
-      && host_integerp (arg1, 0)
+      && tree_fits_shwi_p (arg1)
       && TREE_CODE (arg2) == REAL_CST && !TREE_OVERFLOW (arg2))
     {
       const HOST_WIDE_INT n = tree_low_cst (arg1, 0);
index 9f884b6c8451be59e5f091e6ea936b4fa811a569..fde985328cd31dffc799b77f8843777bfa1cade0 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
+       host_integerp (..., 0) with tree_fits_shwi_p throughout.
+
 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
 
        * c-cilkplus.c: New file.
index 3f325e77098776fb4734deaabacc6460726e0da0..6a5826b0a761feed643e9e23f0d5e7f65972cd8a 100644 (file)
@@ -1813,7 +1813,7 @@ is_simple_enum (tree node)
       if (TREE_CODE (int_val) != INTEGER_CST)
        int_val = DECL_INITIAL (int_val);
 
-      if (!host_integerp (int_val, 0))
+      if (!tree_fits_shwi_p (int_val))
        return false;
       else if (TREE_INT_CST_LOW (int_val) != count)
        return false;
@@ -2205,7 +2205,7 @@ dump_generic_ada_node (pretty_printer *buffer, tree node, tree type, int spc,
         to generate the (0 .. -1) range for flexible array members.  */
       if (TREE_TYPE (node) == sizetype)
        node = fold_convert (ssizetype, node);
-      if (host_integerp (node, 0))
+      if (tree_fits_shwi_p (node))
        pp_wide_integer (buffer, TREE_INT_CST_LOW (node));
       else if (host_integerp (node, 1))
        pp_unsigned_wide_integer (buffer, TREE_INT_CST_LOW (node));
index d7d5cb20a17788530ab29d2db85febc35493b589..d0fc1aafd6b514f24dbba311557db2bff2b895b6 100644 (file)
@@ -6999,7 +6999,7 @@ get_priority (tree args, bool is_destructor)
 
   arg = TREE_VALUE (args);
   arg = default_conversion (arg);
-  if (!host_integerp (arg, /*pos=*/0)
+  if (!tree_fits_shwi_p (arg)
       || !INTEGRAL_TYPE_P (TREE_TYPE (arg)))
     goto invalid;
 
@@ -11243,14 +11243,14 @@ warn_for_sign_compare (location_t location,
       if (TREE_CODE (op1) == BIT_NOT_EXPR)
        op1 = c_common_get_narrower (TREE_OPERAND (op1, 0), &unsignedp1);
 
-      if (host_integerp (op0, 0) || host_integerp (op1, 0))
+      if (tree_fits_shwi_p (op0) || tree_fits_shwi_p (op1))
         {
           tree primop;
           HOST_WIDE_INT constant, mask;
           int unsignedp;
           unsigned int bits;
 
-          if (host_integerp (op0, 0))
+          if (tree_fits_shwi_p (op0))
             {
               primop = op1;
               unsignedp = unsignedp1;
index 99cae172a5bd8dbc0585278c66e62cff885c059d..d0c07e4135421e2839b4c97894a53554e38d0d24 100644 (file)
@@ -1459,7 +1459,7 @@ check_format_arg (void *ctx, tree format_tree,
          res->number_non_literal++;
          return;
        }
-      if (!host_integerp (arg1, 0)
+      if (!tree_fits_shwi_p (arg1)
          || (offset = tree_low_cst (arg1, 0)) < 0)
        {
          res->number_non_literal++;
@@ -1506,7 +1506,7 @@ check_format_arg (void *ctx, tree format_tree,
       return;
     }
   if (TREE_CODE (format_tree) == ARRAY_REF
-      && host_integerp (TREE_OPERAND (format_tree, 1), 0)
+      && tree_fits_shwi_p (TREE_OPERAND (format_tree, 1))
       && (offset += tree_low_cst (TREE_OPERAND (format_tree, 1), 0)) >= 0)
     format_tree = TREE_OPERAND (format_tree, 0);
   if (TREE_CODE (format_tree) == VAR_DECL
@@ -1537,7 +1537,7 @@ check_format_arg (void *ctx, tree format_tree,
       /* Variable length arrays can't be initialized.  */
       gcc_assert (TREE_CODE (array_size) == INTEGER_CST);
 
-      if (host_integerp (array_size, 0))
+      if (tree_fits_shwi_p (array_size))
        {
          HOST_WIDE_INT array_size_value = TREE_INT_CST_LOW (array_size);
          if (array_size_value > 0
index 54ed5512cd4292a2cf4300874088bc8085838ae0..fd4b8579959ed58aa7dd60e75b3ce36d516bad7b 100644 (file)
@@ -586,7 +586,7 @@ c_pretty_printer::direct_abstract_declarator (tree t)
          tree maxval = TYPE_MAX_VALUE (TYPE_DOMAIN (t));
          tree type = TREE_TYPE (maxval);
 
-         if (host_integerp (maxval, 0))
+         if (tree_fits_shwi_p (maxval))
            pp_wide_integer (this, tree_low_cst (maxval, 0) + 1);
          else
            expression (fold_build2 (PLUS_EXPR, type, maxval,
@@ -915,7 +915,7 @@ pp_c_integer_constant (c_pretty_printer *pp, tree i)
     ? TYPE_CANONICAL (TREE_TYPE (i))
     : TREE_TYPE (i);
 
-  if (host_integerp (i, 0))
+  if (tree_fits_shwi_p (i))
     pp_wide_integer (pp, TREE_INT_CST_LOW (i));
   else if (host_integerp (i, 1))
     pp_unsigned_wide_integer (pp, TREE_INT_CST_LOW (i));
index f1b1a4961853c7e4b8a7176caddd93b30c82962c..b2035dfb4746172c8a47c7e875258f69d3ef62ca 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
+       throughout.
+
 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
 
        * c-parser.c (c_parser_cilk_simd): New.
index 6f034029151f58d6749ae2ab7ee0485ad49ba685..58b2ffc0a52bc455f0cc10909fdbaacb566c46e7 100644 (file)
@@ -9736,7 +9736,7 @@ c_parser_omp_clause_collapse (c_parser *parser, tree list)
   mark_exp_read (num);
   num = c_fully_fold (num, false, NULL);
   if (!INTEGRAL_TYPE_P (TREE_TYPE (num))
-      || !host_integerp (num, 0)
+      || !tree_fits_shwi_p (num)
       || (n = tree_low_cst (num, 0)) <= 0
       || (int) n != n)
     {
index cc455e206f19f191998bf525b322fe8a08f8d529..dbfcd01874cb0b6e7effc47b916415e037a37d6d 100644 (file)
@@ -5986,7 +5986,7 @@ alpha_stdarg_optimize_hook (struct stdarg_info *si, const_gimple stmt)
          else
            goto escapes;
 
-         if (!host_integerp (gimple_assign_rhs2 (arg2_stmt), 0))
+         if (!tree_fits_shwi_p (gimple_assign_rhs2 (arg2_stmt)))
            goto escapes;
 
          sub = tree_low_cst (gimple_assign_rhs2 (arg2_stmt), 0);
index 1a2fe8f69f5b3bb7a184720ea5399e6109089bcf..94d9389de53f4b82b037b44266bc48b054a4d234 100644 (file)
         t = DECL_SIZE_UNIT (t);
       else
        t = TYPE_SIZE_UNIT (TREE_TYPE (t));
-      if (t && host_integerp (t, 0))
+      if (t && tree_fits_shwi_p (t))
        {
          size = tree_low_cst (t, 0);
          if (size < 0)
index af7bc8ee4c208a9161660e9139d3216b26fea69f..476e06df796de2b4a5a5359a5b34b67ae9edfaf0 100644 (file)
@@ -72,7 +72,7 @@
            t = DECL_SIZE_UNIT (t);
          else
            t = TYPE_SIZE_UNIT (TREE_TYPE (t));
-         if (t && host_integerp (t, 0))
+         if (t && tree_fits_shwi_p (t))
            {
              size = tree_low_cst (t, 0);
              if (size < 0)
index da6f757d6f9b1919ce17719d9a33cc31e4d3a26d..71987c6112343a53023aa7f5e91da3173fecc5b8 100644 (file)
@@ -1289,7 +1289,7 @@ iq2000_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
            if (TREE_CODE (field) == FIELD_DECL
                && TREE_CODE (TREE_TYPE (field)) == REAL_TYPE
                && TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD
-               && host_integerp (bit_position (field), 0)
+               && tree_fits_shwi_p (bit_position (field))
                && int_bit_position (field) % BITS_PER_WORD == 0)
              break;
 
index b2fd57bb5ffacfdd86926a2988235b29e53bdbc7..055e36afa244af8fcf7e1392a110b245b43fbc73 100644 (file)
@@ -5158,7 +5158,7 @@ mips_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
        if (TREE_CODE (field) == FIELD_DECL
            && SCALAR_FLOAT_TYPE_P (TREE_TYPE (field))
            && TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD
-           && host_integerp (bit_position (field), 0)
+           && tree_fits_shwi_p (bit_position (field))
            && int_bit_position (field) % BITS_PER_WORD == 0)
          break;
 
index ed8eefa31f7a767740ce950da796debc10ec2fd5..58fab9e5ca9e59c36db71d0f668adaa1e7e408c2 100644 (file)
@@ -10193,7 +10193,7 @@ s390_encode_section_info (tree decl, rtx rtl, int first)
        SYMBOL_REF_FLAGS (XEXP (rtl, 0)) |= SYMBOL_FLAG_ALIGN1;
       if (!DECL_SIZE (decl)
          || !DECL_ALIGN (decl)
-         || !host_integerp (DECL_SIZE (decl), 0)
+         || !tree_fits_shwi_p (DECL_SIZE (decl))
          || (DECL_ALIGN (decl) <= 64
              && DECL_ALIGN (decl) != tree_low_cst (DECL_SIZE (decl), 0)))
        SYMBOL_REF_FLAGS (XEXP (rtl, 0)) |= SYMBOL_FLAG_NOT_NATURALLY_ALIGNED;
index 2729ec31f5d82fd5c62efb11e416aeaffd52b615..a131d4b258b56d475c127f3e36c392b23145a173 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * error.c, init.c, parser.c, semantics.c: Replace
+       host_integerp (..., 0) with tree_fits_shwi_p throughout.
+
 2013-11-17  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/59123
index 5f997c3ed2924a04617a01af167ba068c4b226de..7f8607710c84cb7e0c4eb4defa41d8f5d9dcd3e8 100644 (file)
@@ -851,7 +851,7 @@ dump_type_suffix (cxx_pretty_printer *pp, tree t, int flags)
          tree max = TYPE_MAX_VALUE (dtype);
          if (integer_all_onesp (max))
            pp_character (pp, '0');
-         else if (host_integerp (max, 0))
+         else if (tree_fits_shwi_p (max))
            pp_wide_integer (pp, tree_low_cst (max, 0) + 1);
          else
            {
@@ -2285,7 +2285,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags)
              pp_cxx_right_paren (pp);
              break;
            }
-         else if (host_integerp (idx, 0))
+         else if (tree_fits_shwi_p (idx))
            {
              tree virtuals;
              unsigned HOST_WIDE_INT n;
index fde2314e32658969c55819513b9dc64db9be925d..c37423c4c5d2cdcaf50af3def91ec193d20a771b 100644 (file)
@@ -3662,7 +3662,7 @@ build_vec_init (tree base, tree maxindex, tree init,
 
   if (from_array
       || ((type_build_ctor_call (type) || init || explicit_value_init_p)
-         && ! (host_integerp (maxindex, 0)
+         && ! (tree_fits_shwi_p (maxindex)
                && (num_initialized_elts
                    == tree_low_cst (maxindex, 0) + 1))))
     {
index 27f10543b822e5cb0733df9008e10c8786e6d5bc..72fbd0243934c9b2eb5be4187890aca66c7a5fea 100644 (file)
@@ -26962,7 +26962,7 @@ cp_parser_omp_clause_collapse (cp_parser *parser, tree list, location_t location
     return list;
   num = fold_non_dependent_expr (num);
   if (!INTEGRAL_TYPE_P (TREE_TYPE (num))
-      || !host_integerp (num, 0)
+      || !tree_fits_shwi_p (num)
       || (n = tree_low_cst (num, 0)) <= 0
       || (int) n != n)
     {
index f5506d010dcdd79d20a0e760680fff9c79b8e103..781d37386c36ed041c0f7d3cb6fd2c86863715f7 100644 (file)
@@ -8739,8 +8739,8 @@ cxx_eval_bit_field_ref (const constexpr_call *call, tree t,
        return value;
       if (TREE_CODE (TREE_TYPE (field)) == INTEGER_TYPE
          && TREE_CODE (value) == INTEGER_CST
-         && host_integerp (bitpos, 0)
-         && host_integerp (DECL_SIZE (field), 0))
+         && tree_fits_shwi_p (bitpos)
+         && tree_fits_shwi_p (DECL_SIZE (field)))
        {
          HOST_WIDE_INT bit = tree_low_cst (bitpos, 0);
          HOST_WIDE_INT sz = tree_low_cst (DECL_SIZE (field), 0);
index 84f765efe5e7bd07b9c1d21a577eb862c0b24a28..c486a3d00d5384f5340f24262eceaba24682f1a1 100644 (file)
@@ -1519,7 +1519,7 @@ dbxout_type_fields (tree type)
          /* Omit fields whose position or size are variable or too large to
             represent.  */
          || (TREE_CODE (tem) == FIELD_DECL
-             && (! host_integerp (bit_position (tem), 0)
+             && (! tree_fits_shwi_p (bit_position (tem))
                  || ! DECL_SIZE (tem)
                  || ! host_integerp (DECL_SIZE (tem), 1))))
        continue;
@@ -1610,7 +1610,7 @@ dbxout_type_method_1 (tree decl)
   stabstr_C (c1);
   stabstr_C (c2);
 
-  if (DECL_VINDEX (decl) && host_integerp (DECL_VINDEX (decl), 0))
+  if (DECL_VINDEX (decl) && tree_fits_shwi_p (DECL_VINDEX (decl)))
     {
       stabstr_D (tree_low_cst (DECL_VINDEX (decl), 0));
       stabstr_C (';');
@@ -1718,7 +1718,7 @@ dbxout_range_type (tree type, tree low, tree high)
     }
 
   stabstr_C (';');
-  if (low && host_integerp (low, 0))
+  if (low && tree_fits_shwi_p (low))
     {
       if (print_int_cst_bounds_in_octal_p (type, low, high))
         stabstr_O (low);
@@ -1729,7 +1729,7 @@ dbxout_range_type (tree type, tree low, tree high)
     stabstr_C ('0');
 
   stabstr_C (';');
-  if (high && host_integerp (high, 0))
+  if (high && tree_fits_shwi_p (high))
     {
       if (print_int_cst_bounds_in_octal_p (type, low, high))
         stabstr_O (high);
@@ -2516,7 +2516,7 @@ dbxout_expand_expr (tree expr)
          return NULL;
        if (offset != NULL)
          {
-           if (!host_integerp (offset, 0))
+           if (!tree_fits_shwi_p (offset))
              return NULL;
            x = adjust_address_nv (x, mode, tree_low_cst (offset, 0));
          }
@@ -2912,7 +2912,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
         ??? Why do we skip emitting the type and location in this case?  */
       if (TREE_STATIC (decl) && TREE_READONLY (decl)
          && DECL_INITIAL (decl) != 0
-         && host_integerp (DECL_INITIAL (decl), 0)
+         && tree_fits_shwi_p (DECL_INITIAL (decl))
          && ! TREE_ASM_WRITTEN (decl)
          && (DECL_FILE_SCOPE_P (decl)
              || TREE_CODE (DECL_CONTEXT (decl)) == BLOCK
index 24f405ec26ab20080793faa918f715f777960c97..bcfaddadae330f49c56b7fe925e8c25641814fcf 100644 (file)
@@ -14246,16 +14246,16 @@ loc_list_from_tree (tree loc, int want_address)
       }
 
     case INTEGER_CST:
-      if ((want_address || !host_integerp (loc, 0))
+      if ((want_address || !tree_fits_shwi_p (loc))
          && (ret = cst_pool_loc_descr (loc)))
        have_address = 1;
       else if (want_address == 2
-              && host_integerp (loc, 0)
+              && tree_fits_shwi_p (loc)
               && (ret = address_of_int_loc_descriptor
                           (int_size_in_bytes (TREE_TYPE (loc)),
                            tree_low_cst (loc, 0))))
        have_address = 1;
-      else if (host_integerp (loc, 0))
+      else if (tree_fits_shwi_p (loc))
        ret = int_loc_descriptor (tree_low_cst (loc, 0));
       else
        {
@@ -14345,7 +14345,7 @@ loc_list_from_tree (tree loc, int want_address)
 
     case POINTER_PLUS_EXPR:
     case PLUS_EXPR:
-      if (host_integerp (TREE_OPERAND (loc, 1), 0))
+      if (tree_fits_shwi_p (TREE_OPERAND (loc, 1)))
        {
          list_ret = loc_list_from_tree (TREE_OPERAND (loc, 0), 0);
          if (list_ret == 0)
@@ -15526,7 +15526,7 @@ fortran_common (tree decl, HOST_WIDE_INT *value)
   *value = 0;
   if (offset != NULL)
     {
-      if (!host_integerp (offset, 0))
+      if (!tree_fits_shwi_p (offset))
        return NULL_TREE;
       *value = tree_low_cst (offset, 0);
     }
@@ -15694,7 +15694,7 @@ native_encode_initializer (tree init, unsigned char *array, int size)
          constructor_elt *ce;
 
          if (TYPE_DOMAIN (type) == NULL_TREE
-             || !host_integerp (TYPE_MIN_VALUE (TYPE_DOMAIN (type)), 0))
+             || !tree_fits_shwi_p (TYPE_MIN_VALUE (TYPE_DOMAIN (type))))
            return false;
 
          fieldsize = int_size_in_bytes (TREE_TYPE (type));
@@ -15768,7 +15768,7 @@ native_encode_initializer (tree init, unsigned char *array, int size)
                  && ! TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (field))))
                return false;
              else if (DECL_SIZE_UNIT (field) == NULL_TREE
-                      || !host_integerp (DECL_SIZE_UNIT (field), 0))
+                      || !tree_fits_shwi_p (DECL_SIZE_UNIT (field)))
                return false;
              fieldsize = tree_low_cst (DECL_SIZE_UNIT (field), 0);
              pos = int_byte_position (field);
@@ -16160,7 +16160,7 @@ add_bound_info (dw_die_ref subrange_die, enum dwarf_attribute bound_attr, tree b
 
        /* Use the default if possible.  */
        if (bound_attr == DW_AT_lower_bound
-           && host_integerp (bound, 0)
+           && tree_fits_shwi_p (bound)
            && (dflt = lower_bound_default ()) != -1
            && tree_low_cst (bound, 0) == dflt)
          ;
@@ -16394,7 +16394,7 @@ add_bit_offset_attribute (dw_die_ref die, tree decl)
   /* We can't yet handle bit-fields whose offsets are variable, so if we
      encounter such things, just return without generating any attribute
      whatsoever.  Likewise for variable or too large size.  */
-  if (! host_integerp (bit_position (decl), 0)
+  if (! tree_fits_shwi_p (bit_position (decl))
       || ! host_integerp (DECL_SIZE (decl), 1))
     return;
 
@@ -16505,7 +16505,7 @@ add_pure_or_virtual_attribute (dw_die_ref die, tree func_decl)
     {
       add_AT_unsigned (die, DW_AT_virtuality, DW_VIRTUALITY_virtual);
 
-      if (host_integerp (DECL_VINDEX (func_decl), 0))
+      if (tree_fits_shwi_p (DECL_VINDEX (func_decl)))
        add_AT_loc (die, DW_AT_vtable_elem_location,
                    new_loc_descr (DW_OP_constu,
                                   tree_low_cst (DECL_VINDEX (func_decl), 0),
@@ -17055,7 +17055,7 @@ descr_info_loc (tree val, tree base_decl)
     case VAR_DECL:
       return loc_descriptor_from_tree (val, 0);
     case INTEGER_CST:
-      if (host_integerp (val, 0))
+      if (tree_fits_shwi_p (val))
        return int_loc_descriptor (tree_low_cst (val, 0));
       break;
     case INDIRECT_REF:
@@ -17119,7 +17119,7 @@ add_descr_info_field (dw_die_ref die, enum dwarf_attribute attr,
 {
   dw_loc_descr_ref loc;
 
-  if (host_integerp (val, 0))
+  if (tree_fits_shwi_p (val))
     {
       add_AT_unsigned (die, attr, tree_low_cst (val, 0));
       return;
@@ -17172,7 +17172,7 @@ gen_descr_array_type_die (tree type, struct array_descr_info *info,
          /* If it is the default value, omit it.  */
          int dflt;
 
-         if (host_integerp (info->dimen[dim].lower_bound, 0)
+         if (tree_fits_shwi_p (info->dimen[dim].lower_bound)
              && (dflt = lower_bound_default ()) != -1
              && tree_low_cst (info->dimen[dim].lower_bound, 0) == dflt)
            ;
@@ -17322,7 +17322,7 @@ gen_enumeration_type_die (tree type, dw_die_ref context_die)
            value = DECL_INITIAL (value);
 
          if (simple_type_size_in_bits (TREE_TYPE (value))
-             <= HOST_BITS_PER_WIDE_INT || host_integerp (value, 0))
+             <= HOST_BITS_PER_WIDE_INT || tree_fits_shwi_p (value))
            /* DWARF2 does not provide a way of indicating whether or
               not enumeration constants are signed or unsigned.  GDB
               always assumes the values are signed, so we output all
@@ -23112,7 +23112,7 @@ optimize_location_into_implicit_ptr (dw_die_ref die, tree decl)
      we can add DW_OP_GNU_implicit_pointer.  */
   STRIP_NOPS (init);
   if (TREE_CODE (init) == POINTER_PLUS_EXPR
-      && host_integerp (TREE_OPERAND (init, 1), 0))
+      && tree_fits_shwi_p (TREE_OPERAND (init, 1)))
     {
       offset = tree_low_cst (TREE_OPERAND (init, 1), 0);
       init = TREE_OPERAND (init, 0);
index a52d317ddae9fc53dca795a2a07c3c06bcf11572..63d4024b793dd7778bd2ad6ed7ec62f78af52e6c 100644 (file)
@@ -2050,7 +2050,7 @@ expand_builtin_eh_common (tree region_nr_t)
   HOST_WIDE_INT region_nr;
   eh_region region;
 
-  gcc_assert (host_integerp (region_nr_t, 0));
+  gcc_assert (tree_fits_shwi_p (region_nr_t));
   region_nr = tree_low_cst (region_nr_t, 0);
 
   region = (*cfun->eh->region_array)[region_nr];
index bf5742de89652103bde81e386d62409322f68742..a9457690c5a7cbfb88bfde0cd591ae5ee8d91ddc 100644 (file)
@@ -282,7 +282,7 @@ int_expr_size (tree exp)
       gcc_assert (size);
     }
 
-  if (size == 0 || !host_integerp (size, 0))
+  if (size == 0 || !tree_fits_shwi_p (size))
     return -1;
 
   return tree_low_cst (size, 0);
index 23854ccf5c780a74565420750cd203f8089035d1..5fbba60706a75fc06223b19d249d621ff7de69dd 100644 (file)
@@ -5918,8 +5918,8 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
              mode = VOIDmode;
 
            offset = DECL_FIELD_OFFSET (field);
-           if (host_integerp (offset, 0)
-               && host_integerp (bit_position (field), 0))
+           if (tree_fits_shwi_p (offset)
+               && tree_fits_shwi_p (bit_position (field)))
              {
                bitpos = int_bit_position (field);
                offset = 0;
@@ -6008,8 +6008,8 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
        domain = TYPE_DOMAIN (type);
        const_bounds_p = (TYPE_MIN_VALUE (domain)
                          && TYPE_MAX_VALUE (domain)
-                         && host_integerp (TYPE_MIN_VALUE (domain), 0)
-                         && host_integerp (TYPE_MAX_VALUE (domain), 0));
+                         && tree_fits_shwi_p (TYPE_MIN_VALUE (domain))
+                         && tree_fits_shwi_p (TYPE_MAX_VALUE (domain)));
 
        /* If we have constant bounds for the range of the type, get them.  */
        if (const_bounds_p)
@@ -6118,8 +6118,8 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
 
                /* If the range is constant and "small", unroll the loop.  */
                if (const_bounds_p
-                   && host_integerp (lo_index, 0)
-                   && host_integerp (hi_index, 0)
+                   && tree_fits_shwi_p (lo_index)
+                   && tree_fits_shwi_p (hi_index)
                    && (lo = tree_low_cst (lo_index, 0),
                        hi = tree_low_cst (hi_index, 0),
                        count = hi - lo + 1,
@@ -6207,7 +6207,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
                    emit_label (loop_end);
                  }
              }
-           else if ((index != 0 && ! host_integerp (index, 0))
+           else if ((index != 0 && ! tree_fits_shwi_p (index))
                     || ! host_integerp (TYPE_SIZE (elttype), 1))
              {
                tree position;
@@ -8538,7 +8538,7 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode,
         indexed address, for machines that support that.  */
 
       if (modifier == EXPAND_SUM && mode == ptr_mode
-         && host_integerp (treeop1, 0))
+         && tree_fits_shwi_p (treeop1))
        {
          tree exp1 = treeop1;
 
index ae7609158958494b2da0b514efb3235c1977edee..6dc71dce6aeaaa1b6459333bc88a21fdd40068d6 100644 (file)
@@ -94,7 +94,7 @@ struct locate_and_pad_arg_data
 #define ADD_PARM_SIZE(TO, INC)                                 \
 do {                                                           \
   tree inc = (INC);                                            \
-  if (host_integerp (inc, 0))                                  \
+  if (tree_fits_shwi_p (inc))                                  \
     (TO).constant += tree_low_cst (inc, 0);                    \
   else if ((TO).var == 0)                                      \
     (TO).var = fold_convert (ssizetype, inc);                  \
@@ -106,7 +106,7 @@ do {                                                                \
 #define SUB_PARM_SIZE(TO, DEC)                                 \
 do {                                                           \
   tree dec = (DEC);                                            \
-  if (host_integerp (dec, 0))                                  \
+  if (tree_fits_shwi_p (dec))                                  \
     (TO).constant -= tree_low_cst (dec, 0);                    \
   else if ((TO).var == 0)                                      \
     (TO).var = size_binop (MINUS_EXPR, ssize_int (0),          \
index 87cde0454a343fa0e442609e1b209c5d62622c56..d6187bf4997d9dfc1b76bec4a00bd03b3ac365d8 100644 (file)
@@ -3420,7 +3420,7 @@ make_bit_field_ref (location_t loc, tree inner, tree type,
       tree size = TYPE_SIZE (TREE_TYPE (inner));
       if ((INTEGRAL_TYPE_P (TREE_TYPE (inner))
           || POINTER_TYPE_P (TREE_TYPE (inner)))
-         && host_integerp (size, 0)
+         && tree_fits_shwi_p (size)
          && tree_low_cst (size, 0) == bitsize)
        return fold_convert_loc (loc, type, inner);
     }
@@ -7255,8 +7255,8 @@ fold_plusminus_mult_expr (location_t loc, enum tree_code code, tree type,
   /* No identical multiplicands; see if we can find a common
      power-of-two factor in non-power-of-two multiplies.  This
      can help in multi-dimensional array access.  */
-  else if (host_integerp (arg01, 0)
-          && host_integerp (arg11, 0))
+  else if (tree_fits_shwi_p (arg01)
+          && tree_fits_shwi_p (arg11))
     {
       HOST_WIDE_INT int01, int11, tmp;
       bool swap = false;
@@ -7488,7 +7488,7 @@ native_encode_string (const_tree expr, unsigned char *ptr, int len)
   if (TREE_CODE (type) != ARRAY_TYPE
       || TREE_CODE (TREE_TYPE (type)) != INTEGER_TYPE
       || GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (type))) != BITS_PER_UNIT
-      || !host_integerp (TYPE_SIZE_UNIT (type), 0))
+      || !tree_fits_shwi_p (TYPE_SIZE_UNIT (type)))
     return 0;
   total_bytes = tree_low_cst (TYPE_SIZE_UNIT (type), 0);
   if (total_bytes > len)
@@ -9089,7 +9089,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
              indirect_base0 = true;
            }
          offset0 = TREE_OPERAND (arg0, 1);
-         if (host_integerp (offset0, 0))
+         if (tree_fits_shwi_p (offset0))
            {
              HOST_WIDE_INT off = size_low_cst (offset0);
              if ((HOST_WIDE_INT) (((unsigned HOST_WIDE_INT) off)
@@ -9123,7 +9123,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
              indirect_base1 = true;
            }
          offset1 = TREE_OPERAND (arg1, 1);
-         if (host_integerp (offset1, 0))
+         if (tree_fits_shwi_p (offset1))
            {
              HOST_WIDE_INT off = size_low_cst (offset1);
              if ((HOST_WIDE_INT) (((unsigned HOST_WIDE_INT) off)
@@ -12676,9 +12676,9 @@ fold_binary_loc (location_t loc,
       if (((code == LSHIFT_EXPR && TREE_CODE (arg0) == RSHIFT_EXPR)
            || (TYPE_UNSIGNED (type)
               && code == RSHIFT_EXPR && TREE_CODE (arg0) == LSHIFT_EXPR))
-         && host_integerp (arg1, false)
+         && tree_fits_shwi_p (arg1)
          && TREE_INT_CST_LOW (arg1) < prec
-         && host_integerp (TREE_OPERAND (arg0, 1), false)
+         && tree_fits_shwi_p (TREE_OPERAND (arg0, 1))
          && TREE_INT_CST_LOW (TREE_OPERAND (arg0, 1)) < prec)
        {
          HOST_WIDE_INT low0 = TREE_INT_CST_LOW (TREE_OPERAND (arg0, 1));
index 62c555093596f6ed9254902bd5aa13c89fe7ad77..88761bb42e1ca506859859640912c8189d1e99a9 100644 (file)
@@ -2720,7 +2720,7 @@ get_base_constructor (tree base, HOST_WIDE_INT *bit_offset,
     {
       if (!integer_zerop (TREE_OPERAND (base, 1)))
        {
-         if (!host_integerp (TREE_OPERAND (base, 1), 0))
+         if (!tree_fits_shwi_p (TREE_OPERAND (base, 1)))
            return NULL_TREE;
          *bit_offset += (mem_ref_offset (base).low
                          * BITS_PER_UNIT);
index 6de20e396155876424d4c3b263ebbfce65a7a514..51bf7c7c01fc4808745c440c61ab98905d04a7cd 100644 (file)
@@ -609,7 +609,7 @@ stmt_cost (gimple gs, bool speed)
     case MULT_EXPR:
       rhs2 = gimple_assign_rhs2 (gs);
 
-      if (host_integerp (rhs2, 0))
+      if (tree_fits_shwi_p (rhs2))
        return mult_by_coeff_cost (TREE_INT_CST_LOW (rhs2), lhs_mode, speed);
 
       gcc_assert (TREE_CODE (rhs1) != INTEGER_CST);
index 2d642616ae331e9eea4b4ad7728fe15c652da6e1..10d7edc1a39d3ad7924ae74749ae512eee049970 100644 (file)
@@ -2098,8 +2098,8 @@ gimple_compare_field_offset (tree f1, tree f2)
   /* Fortran and C do not always agree on what DECL_OFFSET_ALIGN
      should be, so handle differing ones specially by decomposing
      the offset into a byte and bit offset manually.  */
-  if (host_integerp (DECL_FIELD_OFFSET (f1), 0)
-      && host_integerp (DECL_FIELD_OFFSET (f2), 0))
+  if (tree_fits_shwi_p (DECL_FIELD_OFFSET (f1))
+      && tree_fits_shwi_p (DECL_FIELD_OFFSET (f2)))
     {
       unsigned HOST_WIDE_INT byte_offset1, byte_offset2;
       unsigned HOST_WIDE_INT bit_offset1, bit_offset2;
index 54d9f3bf9b4fe40251849011a7a1e167cf6dcabf..6346004306780871dab2ae547c83ecd38980f6bc 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * gofrontend/expressions.cc: Replace host_integerp (..., 0) with
+       tree_fits_shwi_p throughout.
+
 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
 
        * go-lang.c: Include only gimplify.h and gimple.h as needed.
index 4d2fbfd5a58458f6036942f4bb0b270deca3e793..ca1bb98f9ffb6c71f91d6f1b85af94b7e11e183c 100644 (file)
@@ -3343,7 +3343,7 @@ Type_conversion_expression::do_get_tree(Translate_context* context)
       tree int_type_tree = type_to_tree(int_type->get_backend(gogo));
 
       expr_tree = fold_convert(int_type_tree, expr_tree);
-      if (host_integerp(expr_tree, 0))
+      if (tree_fits_shwi_p (expr_tree))
        {
          HOST_WIDE_INT intval = tree_low_cst(expr_tree, 0);
          std::string s;
index 0303e4f06283c0a876f94badfca4d6a932cdcd5d..8ae38e5f12404f5a1ec9f30b5c345e57a4986c10 100644 (file)
@@ -728,7 +728,7 @@ go_format_type (struct godump_container *container, tree type,
          && tree_int_cst_sgn (TYPE_MIN_VALUE (TYPE_DOMAIN (type))) == 0
          && TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != NULL_TREE
          && TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) == INTEGER_CST
-         && host_integerp (TYPE_MAX_VALUE (TYPE_DOMAIN (type)), 0))
+         && tree_fits_shwi_p (TYPE_MAX_VALUE (TYPE_DOMAIN (type))))
        {
          char buf[100];
 
@@ -981,7 +981,7 @@ go_output_typedef (struct godump_container *container, tree decl)
          if (*slot != NULL)
            macro_hash_del (*slot);
 
-         if (host_integerp (TREE_VALUE (element), 0))
+         if (tree_fits_shwi_p (TREE_VALUE (element)))
            snprintf (buf, sizeof buf, HOST_WIDE_INT_PRINT_DEC,
                     tree_low_cst (TREE_VALUE (element), 0));
          else if (host_integerp (TREE_VALUE (element), 1))
index 8ac22db553e45b28d0c2e88de2d0ff1db604dbfd..7b0ae7ea74dfe45d9071fe725a5e3336288fdc9c 100644 (file)
@@ -170,10 +170,10 @@ graphite_can_represent_init (tree e)
     case MULT_EXPR:
       if (chrec_contains_symbols (TREE_OPERAND (e, 0)))
        return graphite_can_represent_init (TREE_OPERAND (e, 0))
-         && host_integerp (TREE_OPERAND (e, 1), 0);
+         && tree_fits_shwi_p (TREE_OPERAND (e, 1));
       else
        return graphite_can_represent_init (TREE_OPERAND (e, 1))
-         && host_integerp (TREE_OPERAND (e, 0), 0);
+         && tree_fits_shwi_p (TREE_OPERAND (e, 0));
 
     case PLUS_EXPR:
     case POINTER_PLUS_EXPR:
index a07e047832e34e48cac5e7347865e79c2999f9b8..1b2cd998f2cd223a6f0eec94f3fd20b1acec9b1b 100644 (file)
@@ -1508,9 +1508,9 @@ pdr_add_data_dimensions (isl_set *extent, scop_p scop, data_reference_p dr)
          subscript - low >= 0 and high - subscript >= 0 in case one of
         the two bounds isn't known.  Do the same here?  */
 
-      if (host_integerp (low, 0)
+      if (tree_fits_shwi_p (low)
          && high
-         && host_integerp (high, 0)
+         && tree_fits_shwi_p (high)
          /* 1-element arrays at end of structures may extend over
             their declared size.  */
          && !(array_at_struct_end_p (ref)
index a474ccc0d7f2e5bff427fd2e852177451b353b35..01d50f2c111a698ff2895f627655fe7bd8fbce9f 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * class.c, expr.c: Replace host_integerp (..., 0) with
+       tree_fits_shwi_p throughout.
+
 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
 
        * java-gimplify.c: Include only gimplify.h and gimple.h as needed.
index cb6789643d3e8c3934480ee316d842b53649d1b7..5eb245e5376c92349a6f6f394e11e45e63fe4a77 100644 (file)
@@ -1592,7 +1592,7 @@ get_dispatch_vector (tree type)
        {
          tree method_index = get_method_index (method);
          if (method_index != NULL_TREE
-             && host_integerp (method_index, 0))
+             && tree_fits_shwi_p (method_index))
            TREE_VEC_ELT (vtable, tree_low_cst (method_index, 0)) = method;
        }
     }
index a434913d47514af006d318eb539f2e6717861396..0720065717cf1da24f10f9df1fe8fc18c5220a82 100644 (file)
@@ -1049,7 +1049,7 @@ build_newarray (int atype_value, tree length)
   tree prim_type = decode_newarray_type (atype_value);
   tree type
     = build_java_array_type (prim_type,
-                            host_integerp (length, 0) == INTEGER_CST
+                            tree_fits_shwi_p (length) == INTEGER_CST
                             ? tree_low_cst (length, 0) : -1);
 
   /* Pass a reference to the primitive type class and save the runtime
@@ -1069,7 +1069,7 @@ build_anewarray (tree class_type, tree length)
 {
   tree type
     = build_java_array_type (class_type,
-                            host_integerp (length, 0)
+                            tree_fits_shwi_p (length)
                             ? tree_low_cst (length, 0) : -1);
 
   return build_call_nary (promote_type (type),
index 8d5de21bd4bd0de5c585af2fb65badbfecea2933..f67494b47af99d289dcee800fff9c2cefe094a37 100644 (file)
@@ -2290,7 +2290,7 @@ check_omp_nesting_restrictions (gimple stmt, omp_context *ctx)
                        : "#pragma omp cancellation point");
              return false;
            }
-         switch (host_integerp (gimple_call_arg (stmt, 0), 0)
+         switch (tree_fits_shwi_p (gimple_call_arg (stmt, 0))
                  ? tree_low_cst (gimple_call_arg (stmt, 0), 0)
                  : 0)
            {
@@ -8832,7 +8832,7 @@ lower_omp_for_lastprivate (struct omp_for_data *fd, gimple_seq *body_p,
 
   /* When possible, use a strict equality expression.  This can let VRP
      type optimizations deduce the value and remove a copy.  */
-  if (host_integerp (fd->loop.step, 0))
+  if (tree_fits_shwi_p (fd->loop.step))
     {
       HOST_WIDE_INT step = TREE_INT_CST_LOW (fd->loop.step);
       if (step == 1 || step == -1)
@@ -8852,7 +8852,7 @@ lower_omp_for_lastprivate (struct omp_for_data *fd, gimple_seq *body_p,
       /* Optimize: v = 0; is usually cheaper than v = some_other_constant.  */
       vinit = fd->loop.n1;
       if (cond_code == EQ_EXPR
-         && host_integerp (fd->loop.n2, 0)
+         && tree_fits_shwi_p (fd->loop.n2)
          && ! integer_zerop (fd->loop.n2))
        vinit = build_int_cst (TREE_TYPE (fd->loop.v), 0);
       else
index 871fecc0f50c79cd3c54ee2e365fa76afa0010c9..25367825ce928395131cf463ba108b4fe88e8f8f 100644 (file)
@@ -1053,14 +1053,14 @@ strips_small_constant (tree t1, tree t2)
     return NULL;
   else if (TREE_CODE (t1) == SSA_NAME)
     ret = t1;
-  else if (host_integerp (t1, 0))
+  else if (tree_fits_shwi_p (t1))
     value = tree_low_cst (t1, 0);
   else
     return NULL;
 
   if (!t2)
     return ret;
-  else if (host_integerp (t2, 0))
+  else if (tree_fits_shwi_p (t2))
     value = tree_low_cst (t2, 0);
   else if (TREE_CODE (t2) == SSA_NAME)
     {
@@ -1157,7 +1157,7 @@ is_comparison_with_loop_invariant_p (gimple stmt, struct loop *loop,
        code = invert_tree_comparison (code, false);
       bound = iv0.base;
       base = iv1.base;
-      if (host_integerp (iv1.step, 0))
+      if (tree_fits_shwi_p (iv1.step))
        step = iv1.step;
       else
        return false;
@@ -1166,7 +1166,7 @@ is_comparison_with_loop_invariant_p (gimple stmt, struct loop *loop,
     {
       bound = iv1.base;
       base = iv0.base;
-      if (host_integerp (iv0.step, 0))
+      if (tree_fits_shwi_p (iv0.step))
        step = iv0.step;
       else
        return false;
@@ -1300,9 +1300,9 @@ predict_iv_comparison (struct loop *loop, basic_block bb,
 
   /* If loop bound, base and compare bound are all constants, we can
      calculate the probability directly.  */
-  if (host_integerp (loop_bound_var, 0)
-      && host_integerp (compare_var, 0)
-      && host_integerp (compare_base, 0))
+  if (tree_fits_shwi_p (loop_bound_var)
+      && tree_fits_shwi_p (compare_var)
+      && tree_fits_shwi_p (compare_base))
     {
       int probability;
       bool of, overflow = false;
index b9f3e2b792535eb7af00f86c8b481c305e6afe1b..4f1e4ee58260cc23775129102dd0445a7d193fce 100644 (file)
@@ -279,7 +279,7 @@ rtx_addr_can_trap_p_1 (const_rtx x, HOST_WIDE_INT offset, HOST_WIDE_INT size,
          if (!decl)
            decl_size = -1;
          else if (DECL_P (decl) && DECL_SIZE_UNIT (decl))
-           decl_size = (host_integerp (DECL_SIZE_UNIT (decl), 0)
+           decl_size = (tree_fits_shwi_p (DECL_SIZE_UNIT (decl))
                         ? tree_low_cst (DECL_SIZE_UNIT (decl), 0)
                         : -1);
          else if (TREE_CODE (decl) == STRING_CST)
index 1eedde3f5205a0f4f971c29f6920d3a8611e2fad..66682a3c21ec9c25514458ebc96b2f78d187ce14 100644 (file)
@@ -535,8 +535,8 @@ plain_type_1 (tree type, int level)
            = (TYPE_DOMAIN (type)
               && TYPE_MIN_VALUE (TYPE_DOMAIN (type)) != 0
               && TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != 0
-              && host_integerp (TYPE_MAX_VALUE (TYPE_DOMAIN (type)), 0)
-              && host_integerp (TYPE_MIN_VALUE (TYPE_DOMAIN (type)), 0)
+              && tree_fits_shwi_p (TYPE_MAX_VALUE (TYPE_DOMAIN (type)))
+              && tree_fits_shwi_p (TYPE_MIN_VALUE (TYPE_DOMAIN (type)))
               ? (tree_low_cst (TYPE_MAX_VALUE (TYPE_DOMAIN (type)), 0)
                  - tree_low_cst (TYPE_MIN_VALUE (TYPE_DOMAIN (type)), 0) + 1)
               : 0);
@@ -995,7 +995,7 @@ sdbout_field_types (tree type)
        && DECL_NAME (tail)
        && DECL_SIZE (tail)
        && host_integerp (DECL_SIZE (tail), 1)
-       && host_integerp (bit_position (tail), 0))
+       && tree_fits_shwi_p (bit_position (tail)))
       {
        if (POINTER_TYPE_P (TREE_TYPE (tail)))
          sdbout_one_type (TREE_TYPE (TREE_TYPE (tail)));
@@ -1152,7 +1152,7 @@ sdbout_one_type (tree type)
                if (TREE_CODE (value) == CONST_DECL)
                  value = DECL_INITIAL (value);
 
-               if (host_integerp (value, 0))
+               if (tree_fits_shwi_p (value))
                  {
                    PUT_SDB_DEF (IDENTIFIER_POINTER (TREE_PURPOSE (tem)));
                    PUT_SDB_INT_VAL (tree_low_cst (value, 0));
@@ -1174,7 +1174,7 @@ sdbout_one_type (tree type)
                && DECL_NAME (tem)
                && DECL_SIZE (tem)
                && host_integerp (DECL_SIZE (tem), 1)
-               && host_integerp (bit_position (tem), 0))
+               && tree_fits_shwi_p (bit_position (tem)))
              {
                const char *name;
 
index 432842ecf0b1647b264f1fdb58021c21b613c867..6e174e5575c1f4ab0df29bd721b98a380cafe019 100644 (file)
@@ -298,7 +298,7 @@ delegitimize_mem_from_attrs (rtx x)
                                        &mode, &unsignedp, &volatilep, false);
            if (bitsize != GET_MODE_BITSIZE (mode)
                || (bitpos % BITS_PER_UNIT)
-               || (toffset && !host_integerp (toffset, 0)))
+               || (toffset && !tree_fits_shwi_p (toffset)))
              decl = NULL;
            else
              {
index 264c33e3a0b7ad6f40571460ea1a4b994a4805da..d6a8687bddef5ba4872b8bcc906b836f0a027bde 100644 (file)
@@ -1300,8 +1300,8 @@ place_field (record_layout_info rli, tree field)
          if (DECL_BIT_FIELD_TYPE (field)
              && !integer_zerop (DECL_SIZE (field))
              && !integer_zerop (DECL_SIZE (rli->prev_field))
-             && host_integerp (DECL_SIZE (rli->prev_field), 0)
-             && host_integerp (TYPE_SIZE (type), 0)
+             && tree_fits_shwi_p (DECL_SIZE (rli->prev_field))
+             && tree_fits_shwi_p (TYPE_SIZE (type))
              && simple_cst_equal (TYPE_SIZE (type), TYPE_SIZE (prev_type)))
            {
              /* We're in the middle of a run of equal type size fields; make
index 2aa58363224ccccb36bf47a0cf4bcefbae4bb50e..c0ee654561c9f1424188db510ac4870c52a1e5e0 100644 (file)
@@ -2838,14 +2838,14 @@ gcd_of_steps_may_divide_p (const_tree chrec, const_tree cst)
   HOST_WIDE_INT cd = 0, val;
   tree step;
 
-  if (!host_integerp (cst, 0))
+  if (!tree_fits_shwi_p (cst))
     return true;
   val = tree_low_cst (cst, 0);
 
   while (TREE_CODE (chrec) == POLYNOMIAL_CHREC)
     {
       step = CHREC_RIGHT (chrec);
-      if (!host_integerp (step, 0))
+      if (!tree_fits_shwi_p (step))
        return true;
       cd = gcd (cd, tree_low_cst (step, 0));
       chrec = CHREC_LEFT (chrec);
index 91f8c0ef00d1f930d02f47dd23af2d121d3d542e..83fe0d81100197a6b23a23c537756d471b64d949 100644 (file)
@@ -455,8 +455,8 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
                      {
                        tree fsize = DECL_SIZE_UNIT (field);
                        tree ssize = TYPE_SIZE_UNIT (stype);
-                       if (host_integerp (fsize, 0)
-                           && host_integerp (ssize, 0)
+                       if (tree_fits_shwi_p (fsize)
+                           && tree_fits_shwi_p (ssize)
                            && doffset.fits_shwi ())
                          maxsize += ((TREE_INT_CST_LOW (ssize)
                                       - TREE_INT_CST_LOW (fsize))
index 7fe849d914f1c870dec383dc1cc5b174dc4abb0b..6a1c678df36cb3297b14755671b9a613739f6f76 100644 (file)
@@ -272,7 +272,7 @@ dump_array_domain (pretty_printer *buffer, tree domain, int spc, int flags)
 
       if (min && max
          && integer_zerop (min)
-         && host_integerp (max, 0))
+         && tree_fits_shwi_p (max))
        pp_wide_integer (buffer, TREE_INT_CST_LOW (max) + 1);
       else
        {
index c3f6823c5799543a55ab3bb24cf515fb40abec50..2ac9ba1f0042418a1627454e0bd018bdd22faa5c 100644 (file)
@@ -752,7 +752,7 @@ type_internals_preclude_sra_p (tree type, const char **msg)
                *msg = "structure field size not fixed";
                return true;
              }
-           if (!host_integerp (bit_position (fld), 0))
+           if (!tree_fits_shwi_p (bit_position (fld)))
              {
                *msg = "structure field size too big";
                return true;
@@ -2119,7 +2119,7 @@ expr_with_var_bounded_array_refs_p (tree expr)
   while (handled_component_p (expr))
     {
       if (TREE_CODE (expr) == ARRAY_REF
-         && !host_integerp (array_ref_low_bound (expr), 0))
+         && !tree_fits_shwi_p (array_ref_low_bound (expr)))
        return true;
       expr = TREE_OPERAND (expr, 0);
     }
index a33b122d274d2e79d626a6bf8ce0da38cdd915dc..c1028fb760623a0b8cc380b714052d2a64f47b7a 100644 (file)
@@ -614,7 +614,7 @@ ao_ref_init_from_ptr_and_size (ao_ref *ref, tree ptr, tree size)
     }
   ref->offset += extra_offset;
   if (size
-      && host_integerp (size, 0)
+      && tree_fits_shwi_p (size)
       && TREE_INT_CST_LOW (size) * BITS_PER_UNIT / BITS_PER_UNIT
         == TREE_INT_CST_LOW (size))
     ref->max_size = ref->size = TREE_INT_CST_LOW (size) * BITS_PER_UNIT;
@@ -2108,7 +2108,7 @@ stmt_kills_ref_p_1 (gimple stmt, ao_ref *ref)
            {
              tree dest = gimple_call_arg (stmt, 0);
              tree len = gimple_call_arg (stmt, 2);
-             if (!host_integerp (len, 0))
+             if (!tree_fits_shwi_p (len))
                return false;
              tree rbase = ref->base;
              double_int roffset = double_int::from_shwi (ref->offset);
index ce9c0114f82f5b8bb188857091c0980d3a0f1d61..e793dbfe88c8d98457ee231548b0b8e2fa402d32 100644 (file)
@@ -1527,7 +1527,7 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2)
          char *src_buf;
          use_operand_p use_p;
 
-         if (!host_integerp (val2, 0)
+         if (!tree_fits_shwi_p (val2)
              || !host_integerp (len2, 1))
            break;
          if (is_gimple_call (stmt1))
@@ -1569,7 +1569,7 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2)
              src1 = gimple_assign_rhs1 (stmt1);
              if (TREE_CODE (ptr1) != MEM_REF
                  || TYPE_MODE (TREE_TYPE (ptr1)) != TYPE_MODE (char_type_node)
-                 || !host_integerp (src1, 0))
+                 || !tree_fits_shwi_p (src1))
                break;
              ptr1 = build_fold_addr_expr (ptr1);
              callee1 = NULL_TREE;
@@ -2354,7 +2354,7 @@ simplify_rotate (gimple_stmt_iterator *gsi)
        /* Check for one shift count being Y and the other B - Y,
           with optional casts.  */
        if (cdef_code[i] == MINUS_EXPR
-           && host_integerp (cdef_arg1[i], 0)
+           && tree_fits_shwi_p (cdef_arg1[i])
            && tree_low_cst (cdef_arg1[i], 0) == TYPE_PRECISION (rtype)
            && TREE_CODE (cdef_arg2[i]) == SSA_NAME)
          {
@@ -2386,7 +2386,7 @@ simplify_rotate (gimple_stmt_iterator *gsi)
           This alternative is safe even for rotation count of 0.
           One shift count is Y and the other (-Y) & (B - 1).  */
        else if (cdef_code[i] == BIT_AND_EXPR
-                && host_integerp (cdef_arg2[i], 0)
+                && tree_fits_shwi_p (cdef_arg2[i])
                 && tree_low_cst (cdef_arg2[i], 0)
                    == TYPE_PRECISION (rtype) - 1
                 && TREE_CODE (cdef_arg1[i]) == SSA_NAME
index 6d5eeb5de99a8983796cffc191dfee88e2b39c8b..3207dae7c18dabbd0827d12d63c5c3715f32c4cc 100644 (file)
@@ -3970,7 +3970,7 @@ get_loop_invariant_expr_id (struct ivopts_data *data, tree ubase,
             {
               tree ind = TREE_OPERAND (usym, 1);
               if (TREE_CODE (ind) == INTEGER_CST
-                  && host_integerp (ind, 0)
+                  && tree_fits_shwi_p (ind)
                   && TREE_INT_CST_LOW (ind) == 0)
                 usym = TREE_OPERAND (usym, 0);
             }
@@ -3978,7 +3978,7 @@ get_loop_invariant_expr_id (struct ivopts_data *data, tree ubase,
             {
               tree ind = TREE_OPERAND (csym, 1);
               if (TREE_CODE (ind) == INTEGER_CST
-                  && host_integerp (ind, 0)
+                  && tree_fits_shwi_p (ind)
                   && TREE_INT_CST_LOW (ind) == 0)
                 csym = TREE_OPERAND (csym, 0);
             }
index 0939541746e68719c1149f7984aaf2d0491ee94b..e00989527aa44081f097cb6e4bdd4112bfa67304 100644 (file)
@@ -1458,7 +1458,7 @@ add_subscript_strides (tree access_fn, unsigned stride,
       if ((unsigned) loop_depth (aloop) <= min_depth)
        continue;
 
-      if (host_integerp (step, 0))
+      if (tree_fits_shwi_p (step))
        astep = tree_low_cst (step, 0);
       else
        astep = L1_CACHE_LINE_SIZE;
index ca3596c8a0e6510d95a852d4847c35a717a62b9b..fb4ce58378d18179e27f28d61c1796924a2e3ea1 100644 (file)
@@ -1502,7 +1502,7 @@ execute_cse_sincos (void)
                    }
                  else
                    {
-                     if (!host_integerp (arg1, 0))
+                     if (!tree_fits_shwi_p (arg1))
                        break;
 
                      n = TREE_INT_CST_LOW (arg1);
index 7f4a3fddb8073cd739214b6bc3a0e66f5adf053f..4fdaba26d0eb76fe3e4e0911fdbfde3522f78599 100644 (file)
@@ -1360,7 +1360,7 @@ add_or_mark_expr (basic_block bb, tree exp,
 
   if (TREE_CODE (exp) == MEM_REF
       && TREE_CODE (TREE_OPERAND (exp, 0)) == SSA_NAME
-      && host_integerp (TREE_OPERAND (exp, 1), 0)
+      && tree_fits_shwi_p (TREE_OPERAND (exp, 1))
       && (size = int_size_in_bytes (TREE_TYPE (exp))) > 0)
     {
       tree name = TREE_OPERAND (exp, 0);
index 4d0e5e4aa4722d00cdd711a760d50ca09fe826cf..ec5ca02b5b4074f3a441baf007ec2ebe27378d3e 100644 (file)
@@ -3635,7 +3635,7 @@ acceptable_pow_call (gimple stmt, tree *base, HOST_WIDE_INT *exponent)
       *base = gimple_call_arg (stmt, 0);
       arg1 = gimple_call_arg (stmt, 1);
 
-      if (!host_integerp (arg1, 0))
+      if (!tree_fits_shwi_p (arg1))
        return false;
 
       *exponent = TREE_INT_CST_LOW (arg1);
index 1be324e8d5da1292dde6d1ad0bf4bb3693009319..fe01a4128dc9463fc7910b224945c4ea17ff6505 100644 (file)
@@ -782,7 +782,7 @@ copy_reference_ops_from_ref (tree ref, vec<vn_reference_op_s> *result)
        case MEM_REF:
          /* The base address gets its own vn_reference_op_s structure.  */
          temp.op0 = TREE_OPERAND (ref, 1);
-         if (host_integerp (TREE_OPERAND (ref, 1), 0))
+         if (tree_fits_shwi_p (TREE_OPERAND (ref, 1)))
            temp.off = TREE_INT_CST_LOW (TREE_OPERAND (ref, 1));
          break;
        case BIT_FIELD_REF:
@@ -1020,9 +1020,9 @@ ao_ref_init_from_vn_reference (ao_ref *ref,
        case ARRAY_RANGE_REF:
        case ARRAY_REF:
          /* We recorded the lower bound and the element size.  */
-         if (!host_integerp (op->op0, 0)
-             || !host_integerp (op->op1, 0)
-             || !host_integerp (op->op2, 0))
+         if (!tree_fits_shwi_p (op->op0)
+             || !tree_fits_shwi_p (op->op1)
+             || !tree_fits_shwi_p (op->op2))
            max_size = -1;
          else
            {
@@ -1156,7 +1156,7 @@ vn_reference_fold_indirect (vec<vn_reference_op_s> *ops,
       off += double_int::from_shwi (addr_offset);
       mem_op->op0 = double_int_to_tree (TREE_TYPE (mem_op->op0), off);
       op->op0 = build_fold_addr_expr (addr_base);
-      if (host_integerp (mem_op->op0, 0))
+      if (tree_fits_shwi_p (mem_op->op0))
        mem_op->off = TREE_INT_CST_LOW (mem_op->op0);
       else
        mem_op->off = -1;
@@ -1221,7 +1221,7 @@ vn_reference_maybe_forwprop_address (vec<vn_reference_op_s> *ops,
     }
 
   mem_op->op0 = double_int_to_tree (TREE_TYPE (mem_op->op0), off);
-  if (host_integerp (mem_op->op0, 0))
+  if (tree_fits_shwi_p (mem_op->op0))
     mem_op->off = TREE_INT_CST_LOW (mem_op->op0);
   else
     mem_op->off = -1;
index cfd7b00c6a8ddd09a483636568568d43a49372d0..0e66b67bb240fdfe5f648786f88feab40a9d25f6 100644 (file)
@@ -215,7 +215,7 @@ get_stridx (tree exp)
 
   s = string_constant (exp, &o);
   if (s != NULL_TREE
-      && (o == NULL_TREE || host_integerp (o, 0))
+      && (o == NULL_TREE || tree_fits_shwi_p (o))
       && TREE_STRING_LENGTH (s) > 0)
     {
       HOST_WIDE_INT offset = o ? tree_low_cst (o, 0) : 0;
index b478304b965b65bb16ce72c0afeaf8738f0d5c66..78693a32e893fc0c9ca583acc8323e7c1b3d1d32 100644 (file)
@@ -2994,8 +2994,8 @@ process_constraint (constraint_t t)
 static HOST_WIDE_INT
 bitpos_of_field (const tree fdecl)
 {
-  if (!host_integerp (DECL_FIELD_OFFSET (fdecl), 0)
-      || !host_integerp (DECL_FIELD_BIT_OFFSET (fdecl), 0))
+  if (!tree_fits_shwi_p (DECL_FIELD_OFFSET (fdecl))
+      || !tree_fits_shwi_p (DECL_FIELD_BIT_OFFSET (fdecl)))
     return -1;
 
   return (TREE_INT_CST_LOW (DECL_FIELD_OFFSET (fdecl)) * BITS_PER_UNIT
index 2d0c3dc9e2d38ca70a5fcce05abe7b5b706de09f..380002161a216abec0b91bedcfac16e81d6e7a69 100644 (file)
@@ -2547,8 +2547,8 @@ vect_analyze_data_ref_accesses (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo)
          if (!host_integerp (sza, 1)
              || !host_integerp (szb, 1)
              || !tree_int_cst_equal (sza, szb)
-             || !host_integerp (DR_STEP (dra), 0)
-             || !host_integerp (DR_STEP (drb), 0)
+             || !tree_fits_shwi_p (DR_STEP (dra))
+             || !tree_fits_shwi_p (DR_STEP (drb))
              || !tree_int_cst_equal (DR_STEP (dra), DR_STEP (drb)))
            break;
 
@@ -2877,8 +2877,8 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
          if (!operand_equal_p (DR_BASE_ADDRESS (dr_a1->dr),
                                DR_BASE_ADDRESS (dr_a2->dr),
                                0)
-             || !host_integerp (dr_a1->offset, 0)
-             || !host_integerp (dr_a2->offset, 0))
+             || !tree_fits_shwi_p (dr_a1->offset)
+             || !tree_fits_shwi_p (dr_a2->offset))
            continue;
 
          HOST_WIDE_INT diff = TREE_INT_CST_LOW (dr_a2->offset) -
@@ -3069,7 +3069,7 @@ vect_check_gather (gimple stmt, loop_vec_info loop_vinfo, tree *basep,
            }
          break;
        case MULT_EXPR:
-         if (scale == 1 && host_integerp (op1, 0))
+         if (scale == 1 && tree_fits_shwi_p (op1))
            {
              scale = tree_low_cst (op1, 0);
              off = op0;
index edf1e7eb2d9d738c32586a5df0aa3aaa94617850..ba0f4feea6e07fbfc60e0dc9cabe83026d87c85d 100644 (file)
@@ -783,7 +783,7 @@ vect_recog_pow_pattern (vec<gimple> *stmts, tree *type_in,
   *type_out = NULL_TREE;
 
   /* Catch squaring.  */
-  if ((host_integerp (exp, 0)
+  if ((tree_fits_shwi_p (exp)
        && tree_low_cst (exp, 0) == 2)
       || (TREE_CODE (exp) == REAL_CST
           && REAL_VALUES_EQUAL (TREE_REAL_CST (exp), dconst2)))
index 0ce78d9508dee67bd114c38e9a7f01dd10c8fee0..a6c5b596e9b6a97c213cee6c86c1a4d24f2a578e 100644 (file)
@@ -388,7 +388,7 @@ typedef struct _loop_vec_info {
 (L)->may_alias_ddrs.length () > 0
 
 #define NITERS_KNOWN_P(n)                     \
-(host_integerp ((n),0)                        \
+(tree_fits_shwi_p ((n))                        \
 && TREE_INT_CST_LOW ((n)) > 0)
 
 #define LOOP_VINFO_NITERS_KNOWN_P(L)          \
index 374f560817e1cd7ebed916737a1964f7550e4692..59c5452a9a050da79695c505e04d601f300ee13d 100644 (file)
@@ -5040,7 +5040,7 @@ free_lang_data_in_decl (tree decl)
          DECL_VINDEX referring to itself into a vtable slot number as it
         should.  Happens with functions that are copied and then forgotten
         about.  Just clear it, it won't matter anymore.  */
-      if (DECL_VINDEX (decl) && !host_integerp (DECL_VINDEX (decl), 0))
+      if (DECL_VINDEX (decl) && !tree_fits_shwi_p (DECL_VINDEX (decl)))
        DECL_VINDEX (decl) = NULL_TREE;
     }
   else if (TREE_CODE (decl) == VAR_DECL)
index 8b07f9fbf9f123cff0ce5f3c0fdc3714c6a97e85..e07cbe6b55a478c80be69e5ca7a40ade652aad54 100644 (file)
@@ -6290,7 +6290,7 @@ prepare_call_arguments (basic_block bb, rtx insn)
                          && DECL_INITIAL (SYMBOL_REF_DECL (l->loc)))
                        {
                          initial = DECL_INITIAL (SYMBOL_REF_DECL (l->loc));
-                         if (host_integerp (initial, 0))
+                         if (tree_fits_shwi_p (initial))
                            {
                              item = GEN_INT (tree_low_cst (initial, 0));
                              item = gen_rtx_CONCAT (indmode, mem, item);
index 2226912299353f0ad47f4ffc05e0b740bc93b68d..3420e2205668c53101ce1a2b5bf944d6754a101e 100644 (file)
@@ -2709,7 +2709,7 @@ decode_addr_const (tree exp, struct addr_const *value)
   while (1)
     {
       if (TREE_CODE (target) == COMPONENT_REF
-         && host_integerp (byte_position (TREE_OPERAND (target, 1)), 0))
+         && tree_fits_shwi_p (byte_position (TREE_OPERAND (target, 1))))
        {
          offset += int_byte_position (TREE_OPERAND (target, 1));
          target = TREE_OPERAND (target, 0);