diff options
author | Martin Liska <mliska@suse.cz> | 2018-08-27 14:21:11 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-08-27 12:21:11 +0000 |
commit | bb79aba479cf228832b8d2c6bfb8bf420a1f6f4a (patch) | |
tree | d61a4d8814d2d3bcab0e31877144218695fa88ad /gcc/cgraphclones.c | |
parent | 377afcd5beb350a1b7cd07b0a868a766345073e0 (diff) | |
download | gcc-bb79aba479cf228832b8d2c6bfb8bf420a1f6f4a.zip gcc-bb79aba479cf228832b8d2c6bfb8bf420a1f6f4a.tar.gz gcc-bb79aba479cf228832b8d2c6bfb8bf420a1f6f4a.tar.bz2 |
Improve switch code emission for a balanced tree (PR tree-optimization/86847).
2018-08-27 Martin Liska <mliska@suse.cz>
PR tree-optimization/86847
* tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
Dump also subtree probability.
(switch_decision_tree::do_jump_if_equal): New function.
(switch_decision_tree::emit_case_nodes): Handle special
situations in balanced tree that can be emitted much simpler.
Fix calculation of probabilities that happen in tree expansion.
* tree-switch-conversion.h (struct cluster): Add
is_single_value_p.
(struct simple_cluster): Likewise.
(struct case_tree_node): Add new function has_child.
(do_jump_if_equal): New.
2018-08-27 Martin Liska <mliska@suse.cz>
PR tree-optimization/86847
* gcc.dg/tree-ssa/switch-3.c: New test.
* gcc.dg/tree-ssa/vrp105.c: Remove.
From-SVN: r263879
Diffstat (limited to 'gcc/cgraphclones.c')
0 files changed, 0 insertions, 0 deletions