Summary: | [9 Regression] Switch code size growth | ||
---|---|---|---|
Product: | gcc | Reporter: | Evgeny Kudryashov <ka6ash> |
Component: | tree-optimization | Assignee: | Martin Liška <marxin> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | amonakov, dimhen |
Priority: | P3 | ||
Version: | 9.0 | ||
Target Milestone: | 9.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2018-08-04 00:00:00 |
Description
Evgeny Kudryashov
2018-08-03 17:09:55 UTC
Mine Author: marxin Date: Mon Aug 27 12:21:11 2018 New Revision: 263879 URL: https://gcc.gnu.org/viewcvs?rev=263879&root=gcc&view=rev Log: 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. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/switch-3.c Removed: trunk/gcc/testsuite/gcc.dg/tree-ssa/vrp105.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-switch-conversion.c trunk/gcc/tree-switch-conversion.h Fixed. |