On 06/22/2018 03:23 AM, Martin Liška wrote:
> Hi.
> 
> For correctness of clustering algorithm:
> https://www.semanticscholar.org/paper/Short-Communication%3A-Correction-to-'Producing-Good-Kannan-Proebsting/311091fb9fb9d38f7b76e768a603c02acc799fe0
> 
> one needs to allow single case clusters as possible. Note that we never
> end with a jump table, or a bit test handling just a single case.
> I also add tests for that catch that.
> 
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
> 
> Ready to be installed?
> Martin
> 
> gcc/ChangeLog:
> 
> 2018-06-21  Martin Liska  <mli...@suse.cz>
> 
>       * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
>         Add new checking assert to catch invalid state.
>       (jump_table_cluster::can_be_handled): Handle single case
>         clusters.
>       (jump_table_cluster::is_beneficial): Bail out for such case.
>       (bit_test_cluster::find_bit_tests):
>         Add new checking assert to catch invalid state.
>       (bit_test_cluster::can_be_handled): Handle single case
>         clusters.
>       (bit_test_cluster::is_beneficial): Bail out for such case.
>       (switch_decision_tree::analyze_switch_statement):
>         Fix comment.
> 
> gcc/testsuite/ChangeLog:
> 
> 2018-06-21  Martin Liska  <mli...@suse.cz>
> 
>       * gcc.dg/tree-ssa/switch-1.c: New test.
OK.
jeff

Reply via email to