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]

Re: [RFC] avoiding too narrow register classes in reload


On Wed, Dec 15, 2004 at 04:56:08AM -0200, Alexandre Oliva wrote:
> 	* reload.c (SMALL_REGISTER_CLASS_P): New.
> 	(push_secondary_reload, find_reusable_reload, find_reloads): Use
> 	it instead of testing only the class size.

Ok, except,

> +#define SMALL_REGISTER_CLASS_P(C) \
> +  (reg_class_size [(int)(C)] == 1 \
> +   || (reg_class_size [(int)(C)] >= 1 && CLASS_LIKELY_SPILLED_P (C)))

We no longer have to cater to broken K&R compilers that refuse to
index arrays by enums.  Kill the casts.

> -		  if (reg_class_size[this_alternative[i]] == 1
> +		  if (reg_class_size[this_alternative[i]] > 0
> +		      && SMALL_REGISTER_CLASS_P (this_alternative[i])

reg_class_size check redundant with SMALL_REGISTER_CLASS_P.


r~


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