aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.cc')
-rw-r--r--gcc/tree.cc35
1 files changed, 13 insertions, 22 deletions
diff --git a/gcc/tree.cc b/gcc/tree.cc
index 8a8d6d5..69369c6 100644
--- a/gcc/tree.cc
+++ b/gcc/tree.cc
@@ -1763,7 +1763,6 @@ wide_int_to_tree_1 (tree type, const wide_int_ref &pcst)
/* Make sure no one is clobbering the shared constant. */
gcc_checking_assert (TREE_TYPE (t) == type
&& TREE_INT_CST_NUNITS (t) == 1
- && TREE_INT_CST_OFFSET_NUNITS (t) == 1
&& TREE_INT_CST_EXT_NUNITS (t) == 1
&& TREE_INT_CST_ELT (t, 0) == hwi);
return t;
@@ -2676,13 +2675,13 @@ build_zero_cst (tree type)
tree
build_replicated_int_cst (tree type, unsigned int width, HOST_WIDE_INT value)
{
- int n = (TYPE_PRECISION (type) + HOST_BITS_PER_WIDE_INT - 1)
- / HOST_BITS_PER_WIDE_INT;
+ int n = ((TYPE_PRECISION (type) + HOST_BITS_PER_WIDE_INT - 1)
+ / HOST_BITS_PER_WIDE_INT);
unsigned HOST_WIDE_INT low, mask;
- HOST_WIDE_INT a[WIDE_INT_MAX_ELTS];
+ HOST_WIDE_INT a[WIDE_INT_MAX_INL_ELTS];
int i;
- gcc_assert (n && n <= WIDE_INT_MAX_ELTS);
+ gcc_assert (n && n <= WIDE_INT_MAX_INL_ELTS);
if (width == HOST_BITS_PER_WIDE_INT)
low = value;
@@ -2696,8 +2695,8 @@ build_replicated_int_cst (tree type, unsigned int width, HOST_WIDE_INT value)
a[i] = low;
gcc_assert (TYPE_PRECISION (type) <= MAX_BITSIZE_MODE_ANY_INT);
- return wide_int_to_tree
- (type, wide_int::from_array (a, n, TYPE_PRECISION (type)));
+ return wide_int_to_tree (type, wide_int::from_array (a, n,
+ TYPE_PRECISION (type)));
}
/* If floating-point type TYPE has an IEEE-style sign bit, return an
@@ -2789,14 +2788,6 @@ make_int_cst (int len, int ext_len MEM_STAT_DECL)
TREE_SET_CODE (t, INTEGER_CST);
TREE_INT_CST_NUNITS (t) = len;
TREE_INT_CST_EXT_NUNITS (t) = ext_len;
- /* to_offset can only be applied to trees that are offset_int-sized
- or smaller. EXT_LEN is correct if it fits, otherwise the constant
- must be exactly the precision of offset_int and so LEN is correct. */
- if (ext_len <= OFFSET_INT_ELTS)
- TREE_INT_CST_OFFSET_NUNITS (t) = ext_len;
- else
- TREE_INT_CST_OFFSET_NUNITS (t) = len;
-
TREE_CONSTANT (t) = 1;
return t;
@@ -3289,7 +3280,7 @@ really_constant_p (const_tree exp)
like sizetype is used to encode a value that is actually negative. */
bool
-ptrdiff_tree_p (const_tree t, poly_int64_pod *value)
+ptrdiff_tree_p (const_tree t, poly_int64 *value)
{
if (!t)
return false;
@@ -14505,7 +14496,8 @@ set_block (location_t loc, tree block)
location_t pure_loc = get_pure_location (loc);
source_range src_range = get_range_from_loc (line_table, loc);
unsigned discriminator = get_discriminator_from_loc (line_table, loc);
- return COMBINE_LOCATION_DATA (line_table, pure_loc, src_range, block, discriminator);
+ return line_table->get_or_create_combined_loc (pure_loc, src_range, block,
+ discriminator);
}
location_t
@@ -14526,11 +14518,10 @@ set_source_range (tree expr, source_range src_range)
location_t expr_location = EXPR_LOCATION (expr);
location_t pure_loc = get_pure_location (expr_location);
unsigned discriminator = get_discriminator_from_loc (expr_location);
- location_t adhoc = COMBINE_LOCATION_DATA (line_table,
- pure_loc,
- src_range,
- NULL,
- discriminator);
+ location_t adhoc = line_table->get_or_create_combined_loc (pure_loc,
+ src_range,
+ nullptr,
+ discriminator);
SET_EXPR_LOCATION (expr, adhoc);
return adhoc;
}