On 8/30/19 2:41 AM, Martin Liška wrote:
> Hi.
>
> Thanks to Jakub, the patch addresses one memory leak in
> bit_test_cluster::find_bit_tests (allocation of output).
> And moreover, it implements proper guard when clustering
> is not successful. In such situation we want a quick bail out.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?
> Thanks,
> Martin
>
> gcc/ChangeLog:
>
> 2019-08-29 Martin Liska <mli...@suse.cz>
>
> * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
> Bail out when we'll end up with the same number of clusters as
> at the beginning.
> (bit_test_cluster::find_bit_tests): Likewise for bit tests.
> (jump_table_cluster::can_be_handled): Remove the guard
> as it's already handled in ::is_enabled. Allocate output
> after early bail out.
> ---
> gcc/tree-switch-conversion.c | 18 ++++++++----------
> 1 file changed, 8 insertions(+), 10 deletions(-)
>
>
OK
jeff