aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-switch-conversion.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-06-20 10:52:55 +0200
committerMartin Liska <marxin@gcc.gnu.org>2018-06-20 08:52:55 +0000
commitde840bde88a7719fa022f1de6f4e407bf5b4c8a8 (patch)
tree31ad5b9b64472d7ee51da4b2d0450e0c281440bd /gcc/tree-switch-conversion.c
parent2f928c1b63e67155f4b3c194e3a9cc53fb6fb107 (diff)
downloadgcc-de840bde88a7719fa022f1de6f4e407bf5b4c8a8.zip
gcc-de840bde88a7719fa022f1de6f4e407bf5b4c8a8.tar.gz
gcc-de840bde88a7719fa022f1de6f4e407bf5b4c8a8.tar.bz2
Change default for jump_table expansion ratio to 8.
2018-06-20 Martin Liska <mliska@suse.cz> * tree-switch-conversion.c (jump_table_cluster::can_be_handled): Change default ratio from 10 to 8. From-SVN: r261795
Diffstat (limited to 'gcc/tree-switch-conversion.c')
-rw-r--r--gcc/tree-switch-conversion.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index a438960..62ae884 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -1165,17 +1165,11 @@ jump_table_cluster::can_be_handled (const vec<cluster *> &clusters,
make a sequence of conditional branches instead of a dispatch.
The definition of "much bigger" depends on whether we are
- optimizing for size or for speed. If the former, the maximum
- ratio range/count = 3, because this was found to be the optimal
- ratio for size on i686-pc-linux-gnu, see PR11823. The ratio
- 10 is much older, and was probably selected after an extensive
- benchmarking investigation on numerous platforms. Or maybe it
- just made sense to someone at some point in the history of GCC,
- who knows... */
+ optimizing for size or for speed. */
if (!flag_jump_tables)
return false;
- unsigned HOST_WIDE_INT max_ratio = optimize_insn_for_size_p () ? 3 : 10;
+ unsigned HOST_WIDE_INT max_ratio = optimize_insn_for_size_p () ? 3 : 8;
unsigned HOST_WIDE_INT range = get_range (clusters[start]->get_low (),
clusters[end]->get_high ());