[RFC] avoiding too narrow register classes in reload

Alexandre Oliva aoliva@redhat.com
Wed Dec 15 20:07:00 GMT 2004


On Dec 15, 2004, Richard Henderson <rth@redhat.com> wrote:

> 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,

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

Ok

>> -		  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.

I thought I'd leave it in for, like, documentation purposes, just in
case someone reworks SMALL_REGISTER_CLASS_P such that it can match
even for 0-sized classes, but fine.  Here's what I'm checking in.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: reload-small-regclass-likely-spilled-take3.patch
Type: text/x-patch
Size: 3821 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041215/c017bfb2/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


More information about the Gcc-patches mailing list