This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix thinko in early bail out in tree-switch-conversion.
- From: Jeff Law <law at redhat dot com>
- To: Martin Liška <mliska at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Cc: Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 30 Aug 2019 10:28:13 -0600
- Subject: Re: [PATCH] Fix thinko in early bail out in tree-switch-conversion.
- References: <email@example.com>
On 8/30/19 2:41 AM, Martin Liška wrote:
> 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?
> 2019-08-29 Martin Liska <firstname.lastname@example.org>
> * 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(-)