This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: conditional exec verify_live problem after scheduling
- To: Richard Henderson <rth at redhat dot com>
- Subject: Re: conditional exec verify_live problem after scheduling
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Wed, 21 Feb 2001 12:21:25 +0000
- cc: Richard dot Earnshaw at arm dot com, Bernd Schmidt <bernds at redhat dot com>, Richard Earnshaw <rearnsha at arm dot com>, gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Organization: ARM Ltd.
- Reply-To: Richard dot Earnshaw at arm dot com
> > * flow.c (mark_set_1): Make not_dead unsigned long. For
> > non-pseudos, use it as a bitmask of the hard regs that
> > don't die.
>
> A good idea. If you're going to make it a long though...
>
> > ! not_dead |= 1 << (i - regno_first);
> > ! if (!(not_dead & (1 << (i - regno_first))))
>
> ... you need to make the bit you're shifting in a long too.
>
>
> r~
I've updated this as suggested and committed to both trunk and branch.
R.
2001-02-21 Richard Earnshaw <rearnsha@arm.com>
* flow.c (mark_set_1): Make not_dead unsigned long. For
non-pseudos, use it as a bitmask of the hard regs that
don't die.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.374.2.1
diff -p -r1.374.2.1 flow.c
*** flow.c 2001/02/16 02:36:46 1.374.2.1
--- flow.c 2001/02/21 12:14:41
*************** mark_set_1 (pbi, code, reg, cond, insn,
*** 4662,4668 ****
int flags;
{
int regno_first = -1, regno_last = -1;
! int not_dead = 0;
int i;
/* Modifying just one hardware register of a multi-reg value or just a
--- 4662,4668 ----
int flags;
{
int regno_first = -1, regno_last = -1;
! unsigned long not_dead = 0;
int i;
/* Modifying just one hardware register of a multi-reg value or just a
*************** mark_set_1 (pbi, code, reg, cond, insn,
*** 4693,4699 ****
|| GET_CODE (reg) == STRICT_LOW_PART);
if (GET_CODE (reg) == MEM)
break;
! not_dead = REGNO_REG_SET_P (pbi->reg_live, REGNO (reg));
/* Fall through. */
case REG:
--- 4693,4699 ----
|| GET_CODE (reg) == STRICT_LOW_PART);
if (GET_CODE (reg) == MEM)
break;
! not_dead = (unsigned long) REGNO_REG_SET_P (pbi->reg_live, REGNO (reg));
/* Fall through. */
case REG:
*************** mark_set_1 (pbi, code, reg, cond, insn,
*** 4741,4747 ****
+ UNITS_PER_WORD - 1) / UNITS_PER_WORD)
< ((GET_MODE_SIZE (inner_mode)
+ UNITS_PER_WORD - 1) / UNITS_PER_WORD))
! not_dead = REGNO_REG_SET_P (pbi->reg_live, regno_first);
reg = SUBREG_REG (reg);
}
--- 4741,4748 ----
+ UNITS_PER_WORD - 1) / UNITS_PER_WORD)
< ((GET_MODE_SIZE (inner_mode)
+ UNITS_PER_WORD - 1) / UNITS_PER_WORD))
! not_dead = (unsigned long) REGNO_REG_SET_P (pbi->reg_live,
! regno_first);
reg = SUBREG_REG (reg);
}
*************** mark_set_1 (pbi, code, reg, cond, insn,
*** 4837,4843 ****
{
for (i = regno_first; i <= regno_last; ++i)
if (! mark_regno_cond_dead (pbi, i, cond))
! not_dead = 1;
}
#endif
--- 4838,4844 ----
{
for (i = regno_first; i <= regno_last; ++i)
if (! mark_regno_cond_dead (pbi, i, cond))
! not_dead |= ((unsigned long) 1) << (i - regno_first);
}
#endif
*************** mark_set_1 (pbi, code, reg, cond, insn,
*** 4950,4956 ****
/* Mark the register as being dead. */
if (some_was_live
- && ! not_dead
/* The stack pointer is never dead. Well, not strictly true,
but it's very difficult to tell from here. Hopefully
combine_stack_adjustments will fix up the most egregious
--- 4951,4956 ----
*************** mark_set_1 (pbi, code, reg, cond, insn,
*** 4958,4964 ****
&& regno_first != STACK_POINTER_REGNUM)
{
for (i = regno_first; i <= regno_last; ++i)
! CLEAR_REGNO_REG_SET (pbi->reg_live, i);
}
}
else if (GET_CODE (reg) == REG)
--- 4958,4965 ----
&& regno_first != STACK_POINTER_REGNUM)
{
for (i = regno_first; i <= regno_last; ++i)
! if (!(not_dead & (((unsigned long) 1) << (i - regno_first))))
! CLEAR_REGNO_REG_SET (pbi->reg_live, i);
}
}
else if (GET_CODE (reg) == REG)