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]

[PATCH] speedup tagged_types_tu_compatible_p


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.



Attachment: temp.diff.txt
Description: Text document


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