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: [PATCH] speedup tagged_types_tu_compatible_p


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>


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