This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFD: constraint letter suffixes
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: Ulrich Weigand <weigand at immd1 dot informatik dot uni-erlangen dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 13 Jan 2003 20:57:36 +0000
- Subject: Re: RFD: constraint letter suffixes
- Organization: SuperH UK Ltd.
- References: <200301131749.SAA17783@faui11.informatik.uni-erlangen.de>
Ulrich Weigand wrote:
>
> Joern Rennecke wrote:
>
> > P.S.: While I am at rewriting all that code, I think I might as well
> > replace uses of REG_CLASS_FROM_LETTER (*str) with
> > REG_CLASS_FROM_CONSTRAINT (*str, str) ;
>
> As a side note, I was wondering why the new-style macros all get
> both a letter and string (where the letter presumably is always
> guaranteed to be equal to the first character of the string?).
Yes.
> What's the reason for this redundancy?
If the macro definition needs only or mostly the first letter, the code
can be somewhat simpler, thus making the compiler faster. I haven't
benchmarked the impact, but then this might be hard to do in a meanigful
way, as it could vary considerably between targets and input source.
Keeping the interface essentially the same for targets that don't need
the extra functionality seemed to be the safest option.
It also makes it easy to use only the new macros without needing to
dereference if all you want is the first letter.
--
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658