diff options
author | Richard Guenther <rguenther@suse.de> | 2012-03-07 14:31:40 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-03-07 14:31:40 +0000 |
commit | 0f2508394bbfae077f3e5d7ca05e93cabff06471 (patch) | |
tree | 9367ae3ff084cabf2d89d91b25e317ab9c681ccc /gcc/tree-ssa-loop-ivopts.c | |
parent | 647d4b7512f3ecb46466e433adf975d01b810054 (diff) | |
download | gcc-0f2508394bbfae077f3e5d7ca05e93cabff06471.zip gcc-0f2508394bbfae077f3e5d7ca05e93cabff06471.tar.gz gcc-0f2508394bbfae077f3e5d7ca05e93cabff06471.tar.bz2 |
coverage.c (get_gcov_type): Use type_for_mode.
2012-03-07 Richard Guenther <rguenther@suse.de>
* coverage.c (get_gcov_type): Use type_for_mode.
(get_gcov_unsigned_t): Likewise.
* expr.c (store_constructor): Use type_for_mode.
(try_casesi): Likewise.
* tree-ssa-loop-ivopts.c (add_standard_iv_candidates_for_size):
Remove.
(add_standard_iv_candidates): Use standard type trees.
* dojump.c (do_jump): Remove dead code.
From-SVN: r185048
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 10c9352..527c911 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -2405,28 +2405,26 @@ add_candidate (struct ivopts_data *data, add_autoinc_candidates (data, base, step, important, use); } -/* Add a standard "0 + 1 * iteration" iv candidate for a - type with SIZE bits. */ - -static void -add_standard_iv_candidates_for_size (struct ivopts_data *data, - unsigned int size) -{ - tree type = lang_hooks.types.type_for_size (size, true); - add_candidate (data, build_int_cst (type, 0), build_int_cst (type, 1), - true, NULL); -} - /* Adds standard iv candidates. */ static void add_standard_iv_candidates (struct ivopts_data *data) { - add_standard_iv_candidates_for_size (data, INT_TYPE_SIZE); + add_candidate (data, integer_zero_node, integer_one_node, true, NULL); + + /* The same for a double-integer type if it is still fast enough. */ + if (TYPE_PRECISION + (long_integer_type_node) > TYPE_PRECISION (integer_type_node) + && TYPE_PRECISION (long_integer_type_node) <= BITS_PER_WORD) + add_candidate (data, build_int_cst (long_integer_type_node, 0), + build_int_cst (long_integer_type_node, 1), true, NULL); /* The same for a double-integer type if it is still fast enough. */ - if (BITS_PER_WORD >= INT_TYPE_SIZE * 2) - add_standard_iv_candidates_for_size (data, INT_TYPE_SIZE * 2); + if (TYPE_PRECISION + (long_long_integer_type_node) > TYPE_PRECISION (long_integer_type_node) + && TYPE_PRECISION (long_long_integer_type_node) <= BITS_PER_WORD) + add_candidate (data, build_int_cst (long_long_integer_type_node, 0), + build_int_cst (long_long_integer_type_node, 1), true, NULL); } |