summaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 71769eb7d87..1194d099650 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -989,7 +989,7 @@ completely_scalarize_record (tree base, tree decl, HOST_WIDE_INT offset,
struct access *access;
HOST_WIDE_INT size;
- size = tree_low_cst (DECL_SIZE (fld), 1);
+ size = tree_to_uhwi (DECL_SIZE (fld));
access = create_access_1 (base, pos, size);
access->expr = nref;
access->type = ft;
@@ -1008,7 +1008,7 @@ completely_scalarize_record (tree base, tree decl, HOST_WIDE_INT offset,
static void
completely_scalarize_var (tree var)
{
- HOST_WIDE_INT size = tree_low_cst (DECL_SIZE (var), 1);
+ HOST_WIDE_INT size = tree_to_uhwi (DECL_SIZE (var));
struct access *access;
access = create_access_1 (var, 0, size);
@@ -1683,7 +1683,7 @@ build_user_friendly_ref_for_offset (tree *res, tree type, HOST_WIDE_INT offset,
tr_size = TYPE_SIZE (TREE_TYPE (type));
if (!tr_size || !tree_fits_uhwi_p (tr_size))
return false;
- el_size = tree_low_cst (tr_size, 1);
+ el_size = tree_to_uhwi (tr_size);
minidx = TYPE_MIN_VALUE (TYPE_DOMAIN (type));
if (TREE_CODE (minidx) != INTEGER_CST || el_size == 0)
@@ -1764,7 +1764,7 @@ maybe_add_sra_candidate (tree var)
reject (var, "type size not fixed");
return false;
}
- if (tree_low_cst (TYPE_SIZE (type), 1) == 0)
+ if (tree_to_uhwi (TYPE_SIZE (type)) == 0)
{
reject (var, "type size is zero");
return false;
@@ -2488,7 +2488,7 @@ analyze_all_variable_accesses (void)
if (TREE_CODE (var) == VAR_DECL
&& type_consists_of_records_p (TREE_TYPE (var)))
{
- if ((unsigned) tree_low_cst (TYPE_SIZE (TREE_TYPE (var)), 1)
+ if ((unsigned) tree_to_uhwi (TYPE_SIZE (TREE_TYPE (var)))
<= max_total_scalarization_size)
{
completely_scalarize_var (var);
@@ -2802,9 +2802,9 @@ sra_modify_expr (tree *expr, gimple_stmt_iterator *gsi, bool write)
&& tree_fits_uhwi_p (TREE_OPERAND (bfr, 1))
&& tree_fits_uhwi_p (TREE_OPERAND (bfr, 2)))
{
- chunk_size = tree_low_cst (TREE_OPERAND (bfr, 1), 1);
+ chunk_size = tree_to_uhwi (TREE_OPERAND (bfr, 1));
start_offset = access->offset
- + tree_low_cst (TREE_OPERAND (bfr, 2), 1);
+ + tree_to_uhwi (TREE_OPERAND (bfr, 2));
}
else
start_offset = chunk_size = 0;
@@ -3694,7 +3694,7 @@ find_param_candidates (void)
if (!COMPLETE_TYPE_P (type)
|| !tree_fits_uhwi_p (TYPE_SIZE (type))
- || tree_low_cst (TYPE_SIZE (type), 1) == 0
+ || tree_to_uhwi (TYPE_SIZE (type)) == 0
|| (AGGREGATE_TYPE_P (type)
&& type_internals_preclude_sra_p (type, &msg)))
continue;
@@ -4067,9 +4067,9 @@ splice_param_accesses (tree parm, bool *ro_grp)
}
if (POINTER_TYPE_P (TREE_TYPE (parm)))
- agg_size = tree_low_cst (TYPE_SIZE (TREE_TYPE (TREE_TYPE (parm))), 1);
+ agg_size = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (parm))));
else
- agg_size = tree_low_cst (TYPE_SIZE (TREE_TYPE (parm)), 1);
+ agg_size = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (parm)));
if (total_size >= agg_size)
return NULL;
@@ -4088,13 +4088,13 @@ decide_one_param_reduction (struct access *repr)
tree parm;
parm = repr->base;
- cur_parm_size = tree_low_cst (TYPE_SIZE (TREE_TYPE (parm)), 1);
+ cur_parm_size = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (parm)));
gcc_assert (cur_parm_size > 0);
if (POINTER_TYPE_P (TREE_TYPE (parm)))
{
by_ref = true;
- agg_size = tree_low_cst (TYPE_SIZE (TREE_TYPE (TREE_TYPE (parm))), 1);
+ agg_size = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (parm))));
}
else
{