Commit 3c88f366 by Richard Earnshaw Committed by Richard Earnshaw

flow.c (mark_set_1): Make not_dead unsigned long.

* 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.

From-SVN: r39943
parent eccad894
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.
2001-02-21 Neil Booth <neil@daikokuya.demon.co.uk> 2001-02-21 Neil Booth <neil@daikokuya.demon.co.uk>
* cppfiles.c: Update comments. * cppfiles.c: Update comments.
......
...@@ -4667,7 +4667,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) ...@@ -4667,7 +4667,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
int flags; int flags;
{ {
int regno_first = -1, regno_last = -1; int regno_first = -1, regno_last = -1;
int not_dead = 0; unsigned long not_dead = 0;
int i; int i;
/* Modifying just one hardware register of a multi-reg value or just a /* Modifying just one hardware register of a multi-reg value or just a
...@@ -4698,7 +4698,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) ...@@ -4698,7 +4698,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
|| GET_CODE (reg) == STRICT_LOW_PART); || GET_CODE (reg) == STRICT_LOW_PART);
if (GET_CODE (reg) == MEM) if (GET_CODE (reg) == MEM)
break; break;
not_dead = REGNO_REG_SET_P (pbi->reg_live, REGNO (reg)); not_dead = (unsigned long) REGNO_REG_SET_P (pbi->reg_live, REGNO (reg));
/* Fall through. */ /* Fall through. */
case REG: case REG:
...@@ -4746,7 +4746,8 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) ...@@ -4746,7 +4746,8 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
+ UNITS_PER_WORD - 1) / UNITS_PER_WORD) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
< ((GET_MODE_SIZE (inner_mode) < ((GET_MODE_SIZE (inner_mode)
+ UNITS_PER_WORD - 1) / UNITS_PER_WORD)) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
not_dead = REGNO_REG_SET_P (pbi->reg_live, regno_first); not_dead = (unsigned long) REGNO_REG_SET_P (pbi->reg_live,
regno_first);
reg = SUBREG_REG (reg); reg = SUBREG_REG (reg);
} }
...@@ -4842,7 +4843,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) ...@@ -4842,7 +4843,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
{ {
for (i = regno_first; i <= regno_last; ++i) for (i = regno_first; i <= regno_last; ++i)
if (! mark_regno_cond_dead (pbi, i, cond)) if (! mark_regno_cond_dead (pbi, i, cond))
not_dead = 1; not_dead |= ((unsigned long) 1) << (i - regno_first);
} }
#endif #endif
...@@ -4955,7 +4956,6 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) ...@@ -4955,7 +4956,6 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
/* Mark the register as being dead. */ /* Mark the register as being dead. */
if (some_was_live if (some_was_live
&& ! not_dead
/* The stack pointer is never dead. Well, not strictly true, /* The stack pointer is never dead. Well, not strictly true,
but it's very difficult to tell from here. Hopefully but it's very difficult to tell from here. Hopefully
combine_stack_adjustments will fix up the most egregious combine_stack_adjustments will fix up the most egregious
...@@ -4963,7 +4963,8 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) ...@@ -4963,7 +4963,8 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
&& regno_first != STACK_POINTER_REGNUM) && regno_first != STACK_POINTER_REGNUM)
{ {
for (i = regno_first; i <= regno_last; ++i) for (i = regno_first; i <= regno_last; ++i)
CLEAR_REGNO_REG_SET (pbi->reg_live, i); if (!(not_dead & (((unsigned long) 1) << (i - regno_first))))
CLEAR_REGNO_REG_SET (pbi->reg_live, i);
} }
} }
else if (GET_CODE (reg) == REG) else if (GET_CODE (reg) == REG)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment