This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: more predicates
- From: Zack Weinberg <zack at codesourcery dot com>
- To: jlquinn at optonline dot net
- Cc: Giovanni Bajo <giovannibajo at libero dot it>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 16 Jul 2004 13:34:26 -0700
- Subject: Re: more predicates
- References: <6e21416e2f08.6e2f086e2141@optonline.net>
jlquinn@optonline.net writes:
> ----- Original Message -----
> From: Zack Weinberg <zack@codesourcery.com>
> Date: Friday, July 16, 2004 12:50 pm
> Subject: Re: more predicates
>
>> "Giovanni Bajo" <giovannibajo@libero.it> writes:
>> [...]
>> > It would be nice to introduce a couple of macros
>> > GLOBAL_REG_P()/SET_GLOBAL_REG() to handle this (and maybe find a way
>> > to prevent people from using global_regs directly... renaming
>> > it?). The SET macro would abort if used with a wrong register
>> > number.
>
> Can gcc eliminate multiple tests for n < FIRST_PSEUDO_REGISTER?
> Otherwise, we shouldn't poison direct access for places that have
> already performed the safety test, right?
The idea is we don't do multiple tests, everyone uses GLOBAL_REG_P and
doesn't have to check n < FIRST_PSEUDO_REGISTER anymore.
I would hope common subexpression elimination would catch this,
though.
zw