This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [pretty-ipa] EH duplication cleanups


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]