This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: [RFC] avoiding too narrow register classes in reload
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Alexandre Oliva'" <aoliva at redhat dot com>,"'Richard Henderson'" <rth at redhat dot com>
- Cc: "'Bernd Schmidt'" <bernds_cb1 at t-online dot de>,<gcc at gcc dot gnu dot org>,<gcc-patches at gcc dot gnu dot org>
- Date: Thu, 16 Dec 2004 14:11:34 -0000
- Subject: RE: [RFC] avoiding too narrow register classes in reload
> -----Original Message-----
> From: gcc-owner On Behalf Of Alexandre Oliva
> Sent: 15 December 2004 20:07
> On Dec 15, 2004, Richard Henderson wrote:
>
> > Ok, except,
> >> - 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.
As long as it's not in a critical inner loop, I always feel that a couple of
memory accesses and a test-and-branch are a small price to pay for having code
that clearly self-documents the intent behind it. But hey, no big deal :)
cheers,
DaveK
--
Can't think of a witty .sigline today....