summaryrefslogtreecommitdiff
path: root/gcc/tree-object-size.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-18 14:52:19 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-18 14:52:19 +0000
commit6a0712d4ee92fb8ddf409de894393962bb54cbbf (patch)
tree586ec6bfb385ba75fc95f0a7d521c0b51c136124 /gcc/tree-object-size.c
parentfcb97e84adcb5693684d9cfa7b2a97af32ba7a45 (diff)
downloadgcc-6a0712d4ee92fb8ddf409de894393962bb54cbbf.tar.gz
gcc/ada/
* gcc-interface/decl.c, gcc-interface/utils.c, gcc-interface/utils2.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. gcc/c-family/ * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. gcc/c/ * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. gcc/cp/ * call.c, class.c, decl.c, error.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. gcc/objc/ * objc-encoding.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. gcc/ * alias.c, asan.c, builtins.c, cfgexpand.c, cgraph.c, config/aarch64/aarch64.c, config/alpha/predicates.md, config/arm/arm.c, config/darwin.c, config/epiphany/epiphany.c, config/i386/i386.c, config/iq2000/iq2000.c, config/m32c/m32c-pragma.c, config/mep/mep-pragma.c, config/mips/mips.c, config/picochip/picochip.c, config/rs6000/rs6000.c, cppbuiltin.c, dbxout.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, fold-const.c, function.c, gimple-fold.c, godump.c, ipa-cp.c, ipa-prop.c, omp-low.c, predict.c, sdbout.c, stor-layout.c, trans-mem.c, tree-object-size.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-forwprop.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-niter.c, tree-ssa-loop-prefetch.c, tree-ssa-strlen.c, tree-stdarg.c, tree-switch-conversion.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vrp.c, tree.c, tsan.c, ubsan.c, varasm.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204961 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-object-size.c')
-rw-r--r--gcc/tree-object-size.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c
index 98d44bda3f5..f3fb932de23 100644
--- a/gcc/tree-object-size.c
+++ b/gcc/tree-object-size.c
@@ -82,7 +82,7 @@ static void
init_offset_limit (void)
{
if (tree_fits_uhwi_p (TYPE_MAX_VALUE (sizetype)))
- offset_limit = tree_low_cst (TYPE_MAX_VALUE (sizetype), 1);
+ offset_limit = tree_to_uhwi (TYPE_MAX_VALUE (sizetype));
else
offset_limit = -1;
offset_limit /= 2;
@@ -110,7 +110,7 @@ compute_object_offset (const_tree expr, const_tree var)
t = TREE_OPERAND (expr, 1);
off = size_binop (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;
@@ -211,14 +211,14 @@ addr_object_size (struct object_size_info *osi, const_tree ptr,
&& DECL_P (pt_var)
&& tree_fits_uhwi_p (DECL_SIZE_UNIT (pt_var))
&& (unsigned HOST_WIDE_INT)
- tree_low_cst (DECL_SIZE_UNIT (pt_var), 1) < offset_limit)
+ tree_to_uhwi (DECL_SIZE_UNIT (pt_var)) < offset_limit)
pt_var_size = DECL_SIZE_UNIT (pt_var);
else if (pt_var
&& TREE_CODE (pt_var) == STRING_CST
&& TYPE_SIZE_UNIT (TREE_TYPE (pt_var))
&& tree_fits_uhwi_p (TYPE_SIZE_UNIT (TREE_TYPE (pt_var)))
&& (unsigned HOST_WIDE_INT)
- tree_low_cst (TYPE_SIZE_UNIT (TREE_TYPE (pt_var)), 1)
+ tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (pt_var)))
< offset_limit)
pt_var_size = TYPE_SIZE_UNIT (TREE_TYPE (pt_var));
else
@@ -372,7 +372,7 @@ addr_object_size (struct object_size_info *osi, const_tree ptr,
bytes = pt_var_size;
if (tree_fits_uhwi_p (bytes))
- return tree_low_cst (bytes, 1);
+ return tree_to_uhwi (bytes);
return unknown[object_size_type];
}
@@ -436,7 +436,7 @@ alloc_object_size (const_gimple call, int object_size_type)
bytes = fold_convert (sizetype, gimple_call_arg (call, arg1));
if (bytes && tree_fits_uhwi_p (bytes))
- return tree_low_cst (bytes, 1);
+ return tree_to_uhwi (bytes);
return unknown[object_size_type];
}
@@ -799,10 +799,10 @@ plus_stmt_object_size (struct object_size_info *osi, tree var, gimple stmt)
if (! tree_fits_uhwi_p (op1))
bytes = unknown[object_size_type];
else if (TREE_CODE (op0) == SSA_NAME)
- return merge_object_sizes (osi, var, op0, tree_low_cst (op1, 1));
+ return merge_object_sizes (osi, var, op0, tree_to_uhwi (op1));
else
{
- unsigned HOST_WIDE_INT off = tree_low_cst (op1, 1);
+ unsigned HOST_WIDE_INT off = tree_to_uhwi (op1);
/* op0 will be ADDR_EXPR here. */
bytes = addr_object_size (osi, op0, object_size_type);
@@ -1231,7 +1231,7 @@ compute_object_sizes (void)
if (tree_fits_uhwi_p (ost))
{
unsigned HOST_WIDE_INT object_size_type
- = tree_low_cst (ost, 1);
+ = tree_to_uhwi (ost);
if (object_size_type < 2)
result = fold_convert (size_type_node,