This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: added some assert checks in hard-reg-set.h
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: Dimitrios Apostolou <jimis at gmx dot net>
- Cc: gcc-patches at gcc dot gnu dot org, Steven Bosscher <stevenb dot gcc at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Mon, 25 Jul 2011 23:16:13 +0200
- Subject: Re: added some assert checks in hard-reg-set.h
- References: <alpine.LNX.2.02.1107252109370.1374@localhost.localdomain>
On Mon, Jul 25, 2011 at 21:03, Dimitrios Apostolou <jimis@gmx.net> wrote:
> ? ? ? ?* hard-reg-set.h (TEST_HARD_REG_BIT, SET_HARD_REG_BIT,
> CLEAR_HARD_REG_BIT): Added some assert checks for test, set and clear
> operations of HARD_REG_SETs, enabled when RTL checks are on. Runtime
> overhead was measured as negligible.
This should be
* hard-reg-set.h (gcc_rtl_assert): New macro.
(TEST_HARD_REG_BIT, SET_HARD_REG_BIT,
CLEAR_HARD_REG_BIT): Define independent of HARD_REG_SET,
forwarding to...
(hard_reg_set_set_bit, hard_reg_set_clear_bit, hard_reg_set_bit_p):
... these new functions. Add range assertions on bit argument.
I cannot approve the patch though.
Thanks,
Paolo