This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [pretty-ipa] EH duplication cleanups
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 25 Mar 2009 17:32:33 +0100
- Subject: Re: [pretty-ipa] EH duplication cleanups
- References: <20090325151341.GB20304@kam.mff.cuni.cz>
On Wed, Mar 25, 2009 at 4:13 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> this patch makes duplicate_eh_regions to handle AKA bitmaps, so we can actually remove
> unreachable regions earlier than at RTL level (this will come as followup).
>
> I also added pretty dumping of EH tree including all info, not only region names
> and fixed verifier and made it actually used by duplicating code (previously it was dead).
>
> Re-bootstrapping/regtesting x86_64-linux, will commit it to ipa-branch.
>
> ? ? ? ?* except.c (duplicate_eh_regions_0): Walk AKA bitmap
> ? ? ? ?(duplicate_eh_regions_1): Duplicate AKA bitmap.
> ? ? ? ?(duplicate_eh_regions): Verify EH tree; cleanup region array growing;
> ? ? ? ?handle AKA bitmaps.
> ? ? ? ?(dump_eh_tree): Dump all fields nicely.
> ? ? ? ?(verify_eh_tree): Fix bugs in walking.
> Index: except.c
> ===================================================================
> --- except.c ? ?(revision 144988)
> +++ except.c ? ?(working copy)
> @@ -821,6 +971,18 @@ current_function_has_exception_handlers
> ?static void
> ?duplicate_eh_regions_0 (eh_region o, int *min, int *max)
> ?{
> + ?unsigned i;
> + ?bitmap_iterator bi;
> + ?if (o->aka)
> + ? ?{
> + ? ? ?EXECUTE_IF_SET_IN_BITMAP (o->aka, 0, i, bi)
> + ? ? ? {
> + ? ? ? ? if (*min > (int)i)
> + ? ? ? ? ? *min = i;
> + ? ? ? ? if (*max < (int)i)
> + ? ? ? ? ? *max = i;
> + ? ? ? }
> + ? ?}
Hm, maybe I'm missing sth, but isn't this equivalent to
*min = bitmap_first_set_bit ();
*max = bitmap_last_bit_set ();
?
Ok, we don't have bitmap_last_bit_set but that could be added.
Richard.