This is the mail archive of the 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 IMA by speeding up comp_types

On Mar 24, 2005, at 5:48 PM, Geoffrey Keating wrote:

The patch is mostly OK, except that:

- The 'val' field needs to be documented.
- The documentation and name of the tagged_tu_seen structure needs to
  be changed to explain that it's now used as a cache.
- alloc_tagged_tu_seen needs to be changed to explain why it's safe to
  assume that tu->val should be set to 1 (this is where the former
  documentation for tagged_tu_seen should go).

And this is what I am going to apply in tomorrow if there are no objections.


	PR c/18851
	* c-typeck.c (tagged_tu_seen): Rename to ...
	(tagged_tu_seen_cache): this and 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
	(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
	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
	(type_lists_compatible_p): Likewise.
	(all functions): s/tagged_tu_seen/tagged_tu_seen_cache/.

Attachment: t6.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]