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/config | |
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/config')
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 10 | ||||
-rw-r--r-- | gcc/config/alpha/predicates.md | 2 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 10 | ||||
-rw-r--r-- | gcc/config/darwin.c | 6 | ||||
-rw-r--r-- | gcc/config/epiphany/epiphany.c | 2 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 6 | ||||
-rw-r--r-- | gcc/config/iq2000/iq2000.c | 2 | ||||
-rw-r--r-- | gcc/config/m32c/m32c-pragma.c | 4 | ||||
-rw-r--r-- | gcc/config/mep/mep-pragma.c | 4 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 2 | ||||
-rw-r--r-- | gcc/config/picochip/picochip.c | 2 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 16 |
12 files changed, 33 insertions, 33 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 6116986..3bc3593 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -6036,12 +6036,12 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep) || count < 0) return -1; - count *= (1 + tree_low_cst (TYPE_MAX_VALUE (index), 1) - - tree_low_cst (TYPE_MIN_VALUE (index), 1)); + count *= (1 + tree_to_uhwi (TYPE_MAX_VALUE (index)) + - tree_to_uhwi (TYPE_MIN_VALUE (index))); /* There must be no padding. */ if (!tree_fits_uhwi_p (TYPE_SIZE (type)) - || (tree_low_cst (TYPE_SIZE (type), 1) + || (tree_to_uhwi (TYPE_SIZE (type)) != count * GET_MODE_BITSIZE (*modep))) return -1; @@ -6071,7 +6071,7 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep) /* There must be no padding. */ if (!tree_fits_uhwi_p (TYPE_SIZE (type)) - || (tree_low_cst (TYPE_SIZE (type), 1) + || (tree_to_uhwi (TYPE_SIZE (type)) != count * GET_MODE_BITSIZE (*modep))) return -1; @@ -6103,7 +6103,7 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep) /* There must be no padding. */ if (!tree_fits_uhwi_p (TYPE_SIZE (type)) - || (tree_low_cst (TYPE_SIZE (type), 1) + || (tree_to_uhwi (TYPE_SIZE (type)) != count * GET_MODE_BITSIZE (*modep))) return -1; diff --git a/gcc/config/alpha/predicates.md b/gcc/config/alpha/predicates.md index a63d125..8a2166c 100644 --- a/gcc/config/alpha/predicates.md +++ b/gcc/config/alpha/predicates.md @@ -357,7 +357,7 @@ && !SYMBOL_REF_TLS_MODEL (op)) { if (SYMBOL_REF_DECL (op)) - max_ofs = tree_low_cst (DECL_SIZE_UNIT (SYMBOL_REF_DECL (op)), 1); + max_ofs = tree_to_uhwi (DECL_SIZE_UNIT (SYMBOL_REF_DECL (op))); } else return false; diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 6e9faed..72ba2ed 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -4734,12 +4734,12 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep) || count < 0) return -1; - count *= (1 + tree_low_cst (TYPE_MAX_VALUE (index), 1) - - tree_low_cst (TYPE_MIN_VALUE (index), 1)); + count *= (1 + tree_to_uhwi (TYPE_MAX_VALUE (index)) + - tree_to_uhwi (TYPE_MIN_VALUE (index))); /* There must be no padding. */ if (!tree_fits_uhwi_p (TYPE_SIZE (type)) - || (tree_low_cst (TYPE_SIZE (type), 1) + || (tree_to_uhwi (TYPE_SIZE (type)) != count * GET_MODE_BITSIZE (*modep))) return -1; @@ -4769,7 +4769,7 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep) /* There must be no padding. */ if (!tree_fits_uhwi_p (TYPE_SIZE (type)) - || (tree_low_cst (TYPE_SIZE (type), 1) + || (tree_to_uhwi (TYPE_SIZE (type)) != count * GET_MODE_BITSIZE (*modep))) return -1; @@ -4801,7 +4801,7 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep) /* There must be no padding. */ if (!tree_fits_uhwi_p (TYPE_SIZE (type)) - || (tree_low_cst (TYPE_SIZE (type), 1) + || (tree_to_uhwi (TYPE_SIZE (type)) != count * GET_MODE_BITSIZE (*modep))) return -1; diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 3a5287f..63efe49 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -1509,7 +1509,7 @@ machopic_select_section (tree decl, zsize = (DECL_P (decl) && (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == CONST_DECL) - && tree_low_cst (DECL_SIZE_UNIT (decl), 1) == 0); + && tree_to_uhwi (DECL_SIZE_UNIT (decl)) == 0); one = DECL_P (decl) && TREE_CODE (decl) == VAR_DECL @@ -1650,7 +1650,7 @@ machopic_select_section (tree decl, static bool warned_objc_46 = false; /* We shall assert that zero-sized objects are an error in ObjC meta-data. */ - gcc_assert (tree_low_cst (DECL_SIZE_UNIT (decl), 1) != 0); + gcc_assert (tree_to_uhwi (DECL_SIZE_UNIT (decl)) != 0); /* ??? This mechanism for determining the metadata section is broken when LTO is in use, since the frontend that generated @@ -2187,7 +2187,7 @@ darwin_asm_declare_object_name (FILE *file, machopic_define_symbol (DECL_RTL (decl)); } - size = tree_low_cst (DECL_SIZE_UNIT (decl), 1); + size = tree_to_uhwi (DECL_SIZE_UNIT (decl)); #ifdef DEBUG_DARWIN_MEM_ALLOCATORS fprintf (file, "# dadon: %s %s (%llu, %u) local %d weak %d" diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c index ea692fa..3a09efa 100644 --- a/gcc/config/epiphany/epiphany.c +++ b/gcc/config/epiphany/epiphany.c @@ -2785,7 +2785,7 @@ epiphany_adjust_field_align (tree field, unsigned computed) { tree elmsz = TYPE_SIZE (TREE_TYPE (TREE_TYPE (field))); - if (!tree_fits_uhwi_p (elmsz) || tree_low_cst (elmsz, 1) >= 32) + if (!tree_fits_uhwi_p (elmsz) || tree_to_uhwi (elmsz) >= 32) return 64; } return computed; diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 4937b35..8cc408b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -29317,7 +29317,7 @@ ix86_builtin_tm_load (tree type) { if (TREE_CODE (type) == VECTOR_TYPE) { - switch (tree_low_cst (TYPE_SIZE (type), 1)) + switch (tree_to_uhwi (TYPE_SIZE (type))) { case 64: return builtin_decl_explicit (BUILT_IN_TM_LOAD_M64); @@ -29337,7 +29337,7 @@ ix86_builtin_tm_store (tree type) { if (TREE_CODE (type) == VECTOR_TYPE) { - switch (tree_low_cst (TYPE_SIZE (type), 1)) + switch (tree_to_uhwi (TYPE_SIZE (type))) { case 64: return builtin_decl_explicit (BUILT_IN_TM_STORE_M64); @@ -32658,7 +32658,7 @@ get_element_number (tree vec_type, tree arg) unsigned HOST_WIDE_INT elt, max = TYPE_VECTOR_SUBPARTS (vec_type) - 1; if (!tree_fits_uhwi_p (arg) - || (elt = tree_low_cst (arg, 1), elt > max)) + || (elt = tree_to_uhwi (arg), elt > max)) { error ("selector must be an integer constant in the range 0..%wi", max); return 0; diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c index 759229a..e65d0cc 100644 --- a/gcc/config/iq2000/iq2000.c +++ b/gcc/config/iq2000/iq2000.c @@ -1307,7 +1307,7 @@ iq2000_function_arg (cumulative_args_t cum_v, enum machine_mode mode, /* ??? If this is a packed structure, then the last hunk won't be 64 bits. */ chunks - = tree_low_cst (TYPE_SIZE_UNIT (type), 1) / UNITS_PER_WORD; + = tree_to_uhwi (TYPE_SIZE_UNIT (type)) / UNITS_PER_WORD; if (chunks + *arg_words + bias > (unsigned) MAX_ARGS_IN_REGISTERS) chunks = MAX_ARGS_IN_REGISTERS - *arg_words - bias; diff --git a/gcc/config/m32c/m32c-pragma.c b/gcc/config/m32c/m32c-pragma.c index aca7831..aa16a30 100644 --- a/gcc/config/m32c/m32c-pragma.c +++ b/gcc/config/m32c/m32c-pragma.c @@ -48,7 +48,7 @@ m32c_pragma_memregs (cpp_reader * reader ATTRIBUTE_UNUSED) { if (tree_fits_uhwi_p (val)) { - i = tree_low_cst (val, 1); + i = tree_to_uhwi (val); type = pragma_lex (&val); if (type != CPP_EOF) @@ -95,7 +95,7 @@ m32c_pragma_address (cpp_reader * reader ATTRIBUTE_UNUSED) { if (var != error_mark_node) { - unsigned uaddr = tree_low_cst (addr, 1); + unsigned uaddr = tree_to_uhwi (addr); m32c_note_pragma_address (IDENTIFIER_POINTER (var), uaddr); } diff --git a/gcc/config/mep/mep-pragma.c b/gcc/config/mep/mep-pragma.c index 1a4cfee..45a4b44 100644 --- a/gcc/config/mep/mep-pragma.c +++ b/gcc/config/mep/mep-pragma.c @@ -234,7 +234,7 @@ mep_pragma_coprocessor_width (void) case CPP_NUMBER: if (! tree_fits_uhwi_p (val)) break; - i = tree_low_cst (val, 1); + i = tree_to_uhwi (val); /* This pragma no longer has any effect. */ #if 0 if (i == 32) @@ -273,7 +273,7 @@ mep_pragma_coprocessor_subclass (void) type = mep_pragma_lex (&val); if (type != CPP_CHAR) goto syntax_error; - class_letter = tree_low_cst (val, 1); + class_letter = tree_to_uhwi (val); if (class_letter >= 'A' && class_letter <= 'D') switch (class_letter) { diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index a99d76c..c266631 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -14940,7 +14940,7 @@ r10k_safe_mem_expr_p (tree expr, HOST_WIDE_INT offset) return false; offset += bitoffset / BITS_PER_UNIT; - return offset >= 0 && offset < tree_low_cst (DECL_SIZE_UNIT (inner), 1); + return offset >= 0 && offset < tree_to_uhwi (DECL_SIZE_UNIT (inner)); } /* A for_each_rtx callback for which DATA points to the instruction diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c index f10d1ce..641bccb 100644 --- a/gcc/config/picochip/picochip.c +++ b/gcc/config/picochip/picochip.c @@ -810,7 +810,7 @@ picochip_compute_arg_size (const_tree type, enum machine_mode mode) int type_size_in_units = 0; if (type) - type_size_in_units = tree_low_cst (TYPE_SIZE_UNIT (type), 1); + type_size_in_units = tree_to_uhwi (TYPE_SIZE_UNIT (type)); else type_size_in_units = GET_MODE_SIZE (mode); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 8188ba3..cb6ce99 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -6128,7 +6128,7 @@ offsettable_ok_by_alignment (rtx op, HOST_WIDE_INT offset, if (!tree_fits_uhwi_p (DECL_SIZE_UNIT (decl))) return false; - dsize = tree_low_cst (DECL_SIZE_UNIT (decl), 1); + dsize = tree_to_uhwi (DECL_SIZE_UNIT (decl)); if (dsize > 32768) return false; @@ -6152,7 +6152,7 @@ offsettable_ok_by_alignment (rtx op, HOST_WIDE_INT offset, dsize = TREE_STRING_LENGTH (decl); else if (TYPE_SIZE_UNIT (type) && tree_fits_uhwi_p (TYPE_SIZE_UNIT (type))) - dsize = tree_low_cst (TYPE_SIZE_UNIT (type), 1); + dsize = tree_to_uhwi (TYPE_SIZE_UNIT (type)); else return false; if (dsize > 32768) @@ -8559,12 +8559,12 @@ rs6000_aggregate_candidate (const_tree type, enum machine_mode *modep) || count < 0) return -1; - count *= (1 + tree_low_cst (TYPE_MAX_VALUE (index), 1) - - tree_low_cst (TYPE_MIN_VALUE (index), 1)); + count *= (1 + tree_to_uhwi (TYPE_MAX_VALUE (index)) + - tree_to_uhwi (TYPE_MIN_VALUE (index))); /* There must be no padding. */ if (!tree_fits_uhwi_p (TYPE_SIZE (type)) - || (tree_low_cst (TYPE_SIZE (type), 1) + || (tree_to_uhwi (TYPE_SIZE (type)) != count * GET_MODE_BITSIZE (*modep))) return -1; @@ -8594,7 +8594,7 @@ rs6000_aggregate_candidate (const_tree type, enum machine_mode *modep) /* There must be no padding. */ if (!tree_fits_uhwi_p (TYPE_SIZE (type)) - || (tree_low_cst (TYPE_SIZE (type), 1) + || (tree_to_uhwi (TYPE_SIZE (type)) != count * GET_MODE_BITSIZE (*modep))) return -1; @@ -8626,7 +8626,7 @@ rs6000_aggregate_candidate (const_tree type, enum machine_mode *modep) /* There must be no padding. */ if (!tree_fits_uhwi_p (TYPE_SIZE (type)) - || (tree_low_cst (TYPE_SIZE (type), 1) + || (tree_to_uhwi (TYPE_SIZE (type)) != count * GET_MODE_BITSIZE (*modep))) return -1; @@ -12387,7 +12387,7 @@ get_element_number (tree vec_type, tree arg) unsigned HOST_WIDE_INT elt, max = TYPE_VECTOR_SUBPARTS (vec_type) - 1; if (!tree_fits_uhwi_p (arg) - || (elt = tree_low_cst (arg, 1), elt > max)) + || (elt = tree_to_uhwi (arg), elt > max)) { error ("selector must be an integer constant in the range 0..%wi", max); return 0; |