+2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * expr.h: Update comments to refer to tree_to_[su]hwi rather
+ than tree_low_cst.
+ * fold-const.c (fold_binary_loc): Likewise.
+ * expr.c (store_constructor): Use tree_to_uhwi rather than
+ tree_low_cst.
+ * ipa-utils.h (possible_polymorphic_call_target_p): Likewise.
+ * stmt.c (emit_case_dispatch_table): Likewise.
+ * tree-switch-conversion.c (emit_case_bit_tests): Likewise.
+
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* alias.c, asan.c, builtins.c, cfgexpand.c, cgraph.c,
+2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc-interface/cuintp.c (UI_From_gnu): Use tree_to_shwi rather than
+ tree_low_cst.
+
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* gcc-interface/decl.c, gcc-interface/utils.c, gcc-interface/utils2.c:
for (i = Max_For_Dint - 1; i >= 0; i--)
{
- v[i] = tree_low_cst (fold_build1 (ABS_EXPR, gnu_type,
+ v[i] = tree_to_shwi (fold_build1 (ABS_EXPR, gnu_type,
fold_build2 (TRUNC_MOD_EXPR, gnu_type,
- gnu_temp, gnu_base)), 0);
+ gnu_temp, gnu_base)));
gnu_temp = fold_build2 (TRUNC_DIV_EXPR, gnu_type, gnu_temp, gnu_base);
}
+2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
+ tree_low_cst.
+ (complete_array_type): Update comment to refer to tree_to_[su]hwi
+ rather than tree_low_cst.
+
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
return error_mark_node;
}
off = size_binop_loc (input_location, PLUS_EXPR, DECL_FIELD_OFFSET (t),
- size_int (tree_low_cst (DECL_FIELD_BIT_OFFSET (t),
- 1)
+ size_int (tree_to_uhwi (DECL_FIELD_BIT_OFFSET (t))
/ BITS_PER_UNIT));
break;
{
error ("size of array is too large");
/* If we proceed with the array type as it is, we'll eventually
- crash in tree_low_cst(). */
+ crash in tree_to_[su]hwi(). */
type = error_mark_node;
}
+2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * c-decl.c (grokdeclarator): Update comment to refer to
+ tree_to_[su]hwi rather than tree_low_cst.
+
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
else
error_at (loc, "size of unnamed array is too large");
/* If we proceed with the array type as it is, we'll eventually
- crash in tree_low_cst(). */
+ crash in tree_to_[su]hwi(). */
type = error_mark_node;
}
+2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * decl.c (reshape_init_array_1): Use tree_to_uhwi rather than
+ tree_low_cst.
+ (grokdeclarator): Update comment to refer to tree_to_[su]hwi rather
+ than tree_low_cst.
+
2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
* call.c, class.c, decl.c, error.c: Replace tree_low_cst (..., 1) with
max_index_cst = tree_to_uhwi (max_index);
/* sizetype is sign extended, not zero extended. */
else
- max_index_cst = tree_low_cst (fold_convert (size_type_node, max_index),
- 1);
+ max_index_cst = tree_to_uhwi (fold_convert (size_type_node, max_index));
}
/* Loop until there are no more initializers. */
{
error ("size of array %qs is too large", name);
/* If we proceed with the array type as it is, we'll eventually
- crash in tree_low_cst(). */
+ crash in tree_to_[su]hwi(). */
type = error_mark_node;
}
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (exp), idx, value)
{
- int n_elts_here = tree_low_cst
+ int n_elts_here = tree_to_uhwi
(int_const_binop (TRUNC_DIV_EXPR,
TYPE_SIZE (TREE_TYPE (value)),
- TYPE_SIZE (elttype)), 1);
+ TYPE_SIZE (elttype)));
count += n_elts_here;
if (mostly_zeros_p (value))
#include "rtl.h"
/* For optimize_size */
#include "flags.h"
-/* For tree_fits_[su]hwi_p, tree_low_cst, fold_convert, size_binop, ssize_int,
- TREE_CODE, TYPE_SIZE, int_size_in_bytes, */
+/* For tree_fits_[su]hwi_p, tree_to_[su]hwi, fold_convert, size_binop,
+ ssize_int, TREE_CODE, TYPE_SIZE, int_size_in_bytes, */
#include "tree-core.h"
/* For GET_MODE_BITSIZE, word_mode */
#include "machmode.h"
if (TREE_CODE (TREE_OPERAND (pmop[which], 1))
!= INTEGER_CST)
break;
- /* tree_low_cst not used, because we don't care about
+ /* tree_to_[su]hwi not used, because we don't care about
the upper bits. */
cst0 = TREE_INT_CST_LOW (TREE_OPERAND (pmop[which], 1));
cst0 &= cst1;
struct cgraph_node *n)
{
return possible_polymorphic_call_target_p (obj_type_ref_class (call),
- tree_low_cst
- (OBJ_TYPE_REF_TOKEN (call), 1),
+ tree_to_uhwi
+ (OBJ_TYPE_REF_TOKEN (call)),
n);
}
#endif /* GCC_IPA_UTILS_H */
value since that should fit in a HOST_WIDE_INT while the
actual values may not. */
HOST_WIDE_INT i_low
- = tree_low_cst (fold_build2 (MINUS_EXPR, index_type,
- n->low, minval), 1);
+ = tree_to_uhwi (fold_build2 (MINUS_EXPR, index_type,
+ n->low, minval));
HOST_WIDE_INT i_high
- = tree_low_cst (fold_build2 (MINUS_EXPR, index_type,
- n->high, minval), 1);
+ = tree_to_uhwi (fold_build2 (MINUS_EXPR, index_type,
+ n->high, minval));
HOST_WIDE_INT i;
for (i = i_low; i <= i_high; i ++)
else
test[k].bits++;
- lo = tree_low_cst (int_const_binop (MINUS_EXPR,
- CASE_LOW (cs), minval),
- 1);
+ lo = tree_to_uhwi (int_const_binop (MINUS_EXPR,
+ CASE_LOW (cs), minval));
if (CASE_HIGH (cs) == NULL_TREE)
hi = lo;
else
- hi = tree_low_cst (int_const_binop (MINUS_EXPR,
- CASE_HIGH (cs), minval),
- 1);
+ hi = tree_to_uhwi (int_const_binop (MINUS_EXPR,
+ CASE_HIGH (cs), minval));
for (j = lo; j <= hi; j++)
if (j >= HOST_BITS_PER_WIDE_INT)