This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] speedup tagged_types_tu_compatible_p
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 27 Feb 2004 12:38:36 -0800
- Subject: Re: [PATCH] speedup tagged_types_tu_compatible_p
- References: <12316580-695C-11D8-B96D-000393A6D2F2@physics.uc.edu>
Andrew Pinski <pinskia@physics.uc.edu> writes:
> When using IMA, tagged_types_tu_compatible_p is slow because
> ENUMERAL_TYPE has to checked.
> ENUMERAL_TYPE is slow checking because it has go through two linked
> lists. This patch
> speeds up <ENUMERAL_TYPE> case by special casing the case where the
> enumerator types
> values are in the same order.
>
> OK? Bootstrapped on powerpc-apple-darwin7.2.0 with and without
> --enable-intermodule. No
> regressions.
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
>
>
> * c-typeck.c (tagged_types_tu_compatible_p) <ENUMERAL_TYPE>:
> Speedup common case of the type values being in the same order.
This is OK.
--
- Geoffrey Keating <geoffk@geoffk.org>