diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-11-18 14:52:19 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2013-11-18 14:52:19 +0000 |
commit | ae7e9dddb860567a40d7c84736522242236a3355 (patch) | |
tree | 586ec6bfb385ba75fc95f0a7d521c0b51c136124 /gcc/tree.c | |
parent | 9439e9a1a4aed9382d459eab247958671ea5a30d (diff) | |
download | gcc-ae7e9dddb860567a40d7c84736522242236a3355.zip gcc-ae7e9dddb860567a40d7c84736522242236a3355.tar.gz gcc-ae7e9dddb860567a40d7c84736522242236a3355.tar.bz2 |
decl.c, [...]: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout.
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.
From-SVN: r204961
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -2211,20 +2211,20 @@ tree_ctz (const_tree expr) case LSHIFT_EXPR: ret1 = tree_ctz (TREE_OPERAND (expr, 0)); if (tree_fits_uhwi_p (TREE_OPERAND (expr, 1)) - && ((unsigned HOST_WIDE_INT) tree_low_cst (TREE_OPERAND (expr, 1), 1) + && ((unsigned HOST_WIDE_INT) tree_to_uhwi (TREE_OPERAND (expr, 1)) < (unsigned HOST_WIDE_INT) prec)) { - ret2 = tree_low_cst (TREE_OPERAND (expr, 1), 1); + ret2 = tree_to_uhwi (TREE_OPERAND (expr, 1)); return MIN (ret1 + ret2, prec); } return ret1; case RSHIFT_EXPR: if (tree_fits_uhwi_p (TREE_OPERAND (expr, 1)) - && ((unsigned HOST_WIDE_INT) tree_low_cst (TREE_OPERAND (expr, 1), 1) + && ((unsigned HOST_WIDE_INT) tree_to_uhwi (TREE_OPERAND (expr, 1)) < (unsigned HOST_WIDE_INT) prec)) { ret1 = tree_ctz (TREE_OPERAND (expr, 0)); - ret2 = tree_low_cst (TREE_OPERAND (expr, 1), 1); + ret2 = tree_to_uhwi (TREE_OPERAND (expr, 1)); if (ret1 > ret2) return ret1 - ret2; } @@ -2675,7 +2675,7 @@ max_int_size_in_bytes (const_tree type) size_tree = TYPE_ARRAY_MAX_SIZE (type); if (size_tree && tree_fits_uhwi_p (size_tree)) - size = tree_low_cst (size_tree, 1); + size = tree_to_uhwi (size_tree); } /* If we still haven't been able to get a size, see if the language @@ -2686,7 +2686,7 @@ max_int_size_in_bytes (const_tree type) size_tree = lang_hooks.types.max_size (type); if (size_tree && tree_fits_uhwi_p (size_tree)) - size = tree_low_cst (size_tree, 1); + size = tree_to_uhwi (size_tree); } return size; @@ -6120,7 +6120,7 @@ find_atomic_core_type (tree type) if (TYPE_SIZE (type) == NULL_TREE) return NULL_TREE; - HOST_WIDE_INT type_size = tree_low_cst (TYPE_SIZE (type), 1); + HOST_WIDE_INT type_size = tree_to_uhwi (TYPE_SIZE (type)); switch (type_size) { case 8: @@ -7709,7 +7709,7 @@ build_nonstandard_integer_type (unsigned HOST_WIDE_INT precision, ret = itype; if (tree_fits_uhwi_p (TYPE_MAX_VALUE (itype))) - ret = type_hash_canon (tree_low_cst (TYPE_MAX_VALUE (itype), 1), itype); + ret = type_hash_canon (tree_to_uhwi (TYPE_MAX_VALUE (itype)), itype); if (precision <= MAX_INT_CACHED_PREC) nonstandard_integer_type_cache[precision + unsignedp] = ret; @@ -8548,7 +8548,7 @@ get_narrower (tree op, int *unsignedp_ptr) && tree_fits_uhwi_p (DECL_SIZE (TREE_OPERAND (op, 1)))) { unsigned HOST_WIDE_INT innerprec - = tree_low_cst (DECL_SIZE (TREE_OPERAND (op, 1)), 1); + = tree_to_uhwi (DECL_SIZE (TREE_OPERAND (op, 1))); int unsignedp = (DECL_UNSIGNED (TREE_OPERAND (op, 1)) || TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (op, 1)))); tree type = lang_hooks.types.type_for_size (innerprec, unsignedp); @@ -11971,7 +11971,7 @@ get_binfo_at_offset (tree binfo, HOST_WIDE_INT offset, tree expected_type) continue; pos = int_bit_position (fld); - size = tree_low_cst (DECL_SIZE (fld), 1); + size = tree_to_uhwi (DECL_SIZE (fld)); if (pos <= offset && (pos + size) > offset) break; } |