[PATCH 1/3] Fix probabilities for jump table (PR tree-optimization/86702).

marxin mliska@suse.cz
Tue Aug 14 09:04:00 GMT 2018


The patch set even probability to jump tables based on number of
cases which are handled on each edge.

gcc/ChangeLog:

2018-08-06  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.
---
 gcc/tree-switch-conversion.c | 40 ++++++++++++++++++++++++++++++++++--
 gcc/tree-switch-conversion.h | 11 +++++-----
 2 files changed, 43 insertions(+), 8 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-probabilities-for-jump-table-PR-tree-optimizatio.patch
Type: text/x-patch
Size: 4061 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180814/ec1776a5/attachment.bin>


More information about the Gcc-patches mailing list