[RFC] avoiding too narrow register classes in reload

Richard Henderson rth@redhat.com
Wed Dec 15 08:09:00 GMT 2004


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~



More information about the Gcc-patches mailing list