[PATCH] Speedup IMA by speeding up comp_types
Andrew Pinski
pinskia@physics.uc.edu
Thu Mar 24 06:51:00 GMT 2005
This is just a repost (and updated) patch from:
<http://gcc.gnu.org/ml/gcc-patches/2004-10/msg01479.html>
OK? Bootstrapped and tested with all languages (including Ada and
treelang)
on powerpc-darwin with no regressions.
Thanks,
Andrew Pinski
ChangeLog:
PR c/18851
* c-typeck.c (tagged_tu_seen): Add val field.
(comptypes): Move functional to comptypes_internal
and free tagged_tu_seen.
(comptypes_internal): New function and call comptypes_internal
instead of comptypes. Speed up by sibcalling
tagged_types_tu_compatible_p.
(alloc_tagged_tu_seen): New function
(free_all_tagged_tu_seen_up_to): New function.
(tagged_types_tu_compatible_p): Return the val of the seen two
types.
Add that the two types are the same to tagged_tu_seen_base
if they are and call comptypes_internal instead of comptypes.
<case UNION_TYPE>: Speed up common type where the fields are
in the same order.
(function_types_compatible_p): Call comptypes_internal instead of
comptypes.
(type_lists_compatible_p): Likewise.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: speedupIMA.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050324/b4afa260/attachment.txt>
More information about the Gcc-patches
mailing list