This is the mail archive of the
mailing list for the GCC project.
Re: PING: [PATCH] Add SUBREG_REG_P predicate and change REG_SUBREG_P to be global
- From: Shujing Zhao <pearly dot zhao at oracle dot com>
- To: Olivier Hainque <hainque at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de, Paolo Bonzini <paolo dot bonzini at gmail dot com>, Paolo Carlini <paolo dot carlini at oracle dot com>
- Date: Tue, 23 Jun 2009 17:14:06 +0800
- Subject: Re: PING: [PATCH] Add SUBREG_REG_P predicate and change REG_SUBREG_P to be global
- References: <4A407B3D.email@example.com> <20090623082932.GA9870@cardhu.act-europe.fr>
On 06/23/2009 04:29 PM, Olivier Hainque wrote:
Thanks Olivier, I think you are right.
Now, IMVHO, having two different predicates with so similar names is a
potential source of confusion and mistakes, for both code readers and
If we're going the extra predicate way as suggested, could we please
take the opportunity to introduce slightly more descriptive names, for
example SUBREG_OF_REG_P and REG_OR_SUBREG_OF_REG_P ?
I think the disambiguation-hence-mistake-avoidance is well worth
having slightly longer names to type and read. In this particular
case, I'd actually rather not have a second predicate instead of
one with so similar a name.
I don't know much about RTL, actually I'm a beginner of gcc. But it
seems the name of SUBREG_OF_REG_P and REG_OR_SUBREG_OF_REG_P is not
consistent with the other predicates.
Can some maintainer comment?