tree-switch-conversion.h
26.4 KB
-
Improve switch code emission for a balanced tree (PR tree-optimization/86847). · bb79aba4
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
Martin Liska committed