Fix probabilities for jump table (PR tree-optimization/86702).
authorMartin Liska <mliska@suse.cz>
Mon, 27 Aug 2018 12:17:54 +0000 (14:17 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 27 Aug 2018 12:17:54 +0000 (12:17 +0000)
commitdbdfaaba50c5d7d85c1e64751988d00114fd7d6b
tree5c8f893e4a884022f9007c23ad181990fb45cdce
parent61ff5d6f4ed5000ee427e054ee803bc8f5535bdd
Fix probabilities for jump table (PR tree-optimization/86702).

2018-08-27  Martin Liska  <mliska@suse.cz>

        PR tree-optimization/86702
* tree-switch-conversion.c (jump_table_cluster::emit):
        Make probabilities even for values in jump table
        according to number of cases handled.
(switch_decision_tree::compute_cases_per_edge): Pass
        argument to reset_out_edges_aux function.
(switch_decision_tree::analyze_switch_statement): Likewise.
* tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
        Make it static.

From-SVN: r263877
gcc/ChangeLog
gcc/tree-switch-conversion.c
gcc/tree-switch-conversion.h