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] |
Even though we are into stage3, I am going to send this because it
makes --enable-intermodule usable and IMA even more. I can now build
GCC in a more reasonable time with --enable-intermodule with this patch.
Basically we can cache more if two types have been considered
compatible and also keep it over the whole comptypes. Also now most of
the time is spent in the tree optimizers rather than the front-end.
OK? Bootstrapped and tested on powerpc-darwin with no regressions.
ChangeLog: * c-typeck.c (comptypes): Move functional to comptypes_internal and free tagged_tu_seen. (comptypes_internal): New function and call comptypes_internal instead of comptypes. (alloc_tagged_tu_seen): New function (free_all_tagged_tu_seen_up_to): New function. (tagged_types_tu_compatible_p): 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.
I sent the wrong patch (I had forgot to do a cvs diff again and check to make sure I sent the right patch). The main differences between this patch and the previous one is that we record the value which comptypes would return and we free the allocated types at the right time.
* 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.
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] |