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/ada/gcc-interface/utils.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/ada/gcc-interface/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 0e4099c..b92531b 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -771,7 +771,7 @@ make_aligning_type (tree type, unsigned int align, tree size, tree make_packable_type (tree type, bool in_record) { - unsigned HOST_WIDE_INT size = tree_low_cst (TYPE_SIZE (type), 1); + unsigned HOST_WIDE_INT size = tree_to_uhwi (TYPE_SIZE (type)); unsigned HOST_WIDE_INT new_size; tree new_type, old_field, field_list = NULL_TREE; unsigned int align; @@ -918,7 +918,7 @@ make_type_from_size (tree type, tree size_tree, bool for_biased) if (!size_tree || !tree_fits_uhwi_p (size_tree)) return type; - size = tree_low_cst (size_tree, 1); + size = tree_to_uhwi (size_tree); switch (TREE_CODE (type)) { @@ -1744,7 +1744,7 @@ rest_of_record_type_compilation (tree record_type) && tree_fits_uhwi_p (TREE_OPERAND (curpos, 1))) { tree offset = TREE_OPERAND (curpos, 0); - align = tree_low_cst (TREE_OPERAND (curpos, 1), 1); + align = tree_to_uhwi (TREE_OPERAND (curpos, 1)); align = scale_by_factor_of (offset, align); last_pos = round_up (last_pos, align); pos = compute_related_constant (curpos, last_pos); @@ -1758,9 +1758,9 @@ rest_of_record_type_compilation (tree record_type) { tree offset = TREE_OPERAND (TREE_OPERAND (curpos, 0), 0); unsigned HOST_WIDE_INT addend - = tree_low_cst (TREE_OPERAND (curpos, 1), 1); + = tree_to_uhwi (TREE_OPERAND (curpos, 1)); align - = tree_low_cst (TREE_OPERAND (TREE_OPERAND (curpos, 0), 1), 1); + = tree_to_uhwi (TREE_OPERAND (TREE_OPERAND (curpos, 0), 1)); align = scale_by_factor_of (offset, align); align = MIN (align, addend & -addend); last_pos = round_up (last_pos, align); @@ -2378,7 +2378,7 @@ create_field_decl (tree field_name, tree field_type, tree record_type, unsigned int known_align; if (tree_fits_uhwi_p (pos)) - known_align = tree_low_cst (pos, 1) & - tree_low_cst (pos, 1); + known_align = tree_to_uhwi (pos) & - tree_to_uhwi (pos); else known_align = BITS_PER_UNIT; @@ -2549,7 +2549,7 @@ bool value_factor_p (tree value, HOST_WIDE_INT factor) { if (tree_fits_uhwi_p (value)) - return tree_low_cst (value, 1) % factor == 0; + return tree_to_uhwi (value) % factor == 0; if (TREE_CODE (value) == MULT_EXPR) return (value_factor_p (TREE_OPERAND (value, 0), factor) @@ -2616,8 +2616,8 @@ potential_alignment_gap (tree prev_field, tree curr_field, tree offset) iff it is not multiple of the current field alignment. */ if (tree_fits_uhwi_p (DECL_SIZE (prev_field)) && tree_fits_uhwi_p (bit_position (prev_field))) - return ((tree_low_cst (bit_position (prev_field), 1) - + tree_low_cst (DECL_SIZE (prev_field), 1)) + return ((tree_to_uhwi (bit_position (prev_field)) + + tree_to_uhwi (DECL_SIZE (prev_field))) % DECL_ALIGN (curr_field) != 0); /* If both the position and size of the previous field are multiples @@ -3274,7 +3274,7 @@ build_vms_descriptor32 (tree type, Mechanism_Type mech, Entity_Id gnat_entity) case ENUMERAL_TYPE: case BOOLEAN_TYPE: if (TYPE_VAX_FLOATING_POINT_P (type)) - switch (tree_low_cst (TYPE_DIGITS_VALUE (type), 1)) + switch (tree_to_uhwi (TYPE_DIGITS_VALUE (type))) { case 6: dtype = 10; @@ -3314,7 +3314,7 @@ build_vms_descriptor32 (tree type, Mechanism_Type mech, Entity_Id gnat_entity) case COMPLEX_TYPE: if (TREE_CODE (TREE_TYPE (type)) == INTEGER_TYPE && TYPE_VAX_FLOATING_POINT_P (type)) - switch (tree_low_cst (TYPE_DIGITS_VALUE (type), 1)) + switch (tree_to_uhwi (TYPE_DIGITS_VALUE (type))) { case 6: dtype = 12; @@ -3575,7 +3575,7 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity) case ENUMERAL_TYPE: case BOOLEAN_TYPE: if (TYPE_VAX_FLOATING_POINT_P (type)) - switch (tree_low_cst (TYPE_DIGITS_VALUE (type), 1)) + switch (tree_to_uhwi (TYPE_DIGITS_VALUE (type))) { case 6: dtype = 10; @@ -3615,7 +3615,7 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity) case COMPLEX_TYPE: if (TREE_CODE (TREE_TYPE (type)) == INTEGER_TYPE && TYPE_VAX_FLOATING_POINT_P (type)) - switch (tree_low_cst (TYPE_DIGITS_VALUE (type), 1)) + switch (tree_to_uhwi (TYPE_DIGITS_VALUE (type))) { case 6: dtype = 12; @@ -6310,7 +6310,7 @@ handle_vector_size_attribute (tree *node, tree name, tree args, } /* Get the vector size (in bytes). */ - vecsize = tree_low_cst (size, 1); + vecsize = tree_to_uhwi (size); /* We need to provide for vector pointers, vector arrays, and functions returning vectors. For example: @@ -6342,7 +6342,7 @@ handle_vector_size_attribute (tree *node, tree name, tree args, return NULL_TREE; } - if (vecsize % tree_low_cst (TYPE_SIZE_UNIT (type), 1)) + if (vecsize % tree_to_uhwi (TYPE_SIZE_UNIT (type))) { error ("vector size not an integral multiple of component size"); return NULL; @@ -6355,7 +6355,7 @@ handle_vector_size_attribute (tree *node, tree name, tree args, } /* Calculate how many units fit in the vector. */ - nunits = vecsize / tree_low_cst (TYPE_SIZE_UNIT (type), 1); + nunits = vecsize / tree_to_uhwi (TYPE_SIZE_UNIT (type)); if (nunits & (nunits - 1)) { error ("number of components of the vector not a power of two"); @@ -6427,9 +6427,9 @@ handle_vector_type_attribute (tree *node, tree name, tree ARG_UNUSED (args), /* Sanity check the vector size and element type consistency. */ - vec_bytes = tree_low_cst (rep_size, 1); + vec_bytes = tree_to_uhwi (rep_size); - if (vec_bytes % tree_low_cst (TYPE_SIZE_UNIT (elem_type), 1)) + if (vec_bytes % tree_to_uhwi (TYPE_SIZE_UNIT (elem_type))) { error ("vector size not an integral multiple of component size"); return NULL; @@ -6441,7 +6441,7 @@ handle_vector_type_attribute (tree *node, tree name, tree ARG_UNUSED (args), return NULL; } - vec_units = vec_bytes / tree_low_cst (TYPE_SIZE_UNIT (elem_type), 1); + vec_units = vec_bytes / tree_to_uhwi (TYPE_SIZE_UNIT (elem_type)); if (vec_units & (vec_units - 1)) { error ("number of components of the vector not a power of two"); |