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] cse.c: Speed up cse_reg_info maintenance.

Kazu Hirata wrote:

Attached is a patch to speed up cse_reg_info maintenance.

Instances of cse_reg_info are maintained using a free list and a used
list.  The free list is a list of cse_reg_info instances that have
been allocated but are currently unused.  The used list is a list of
currently used cse_reg_info instances.

CSE has an interesting property that it keeps allocating an instance
of cse_reg_info and then "free"s all the instances at once.

Sounds like you want an obstack :)

2005-01-28 Kazu Hirata <>

	* cse.c (cse_reg_info_free_list, cse_reg_info_used_list,
	cse_reg_info_used_list_end): Remove.
	(cse_reg_info_list, cse_reg_info_list_free): New.
	(get_cse_reg_info): When allocating an instance of
	cse_reg_info, add it to the beginning of the cse_reg_info_list
	list.  Remove code to maintain cse_reg_info_used_list.
	(new_basic_block): Reset the free list to the beginning of

Ok, but...

! /* A linked list of cse_reg_info entries that have been allocated so
!    far.  */
! static struct cse_reg_info *cse_reg_info_list;

Expand the comment with one or two more sentences describing how it's partitioned.


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