From b183fde1d88d179a3bb93c7d613191ad76ab4c15 Mon Sep 17 00:00:00 2001 From: rearnsha Date: Wed, 21 Feb 2001 12:18:11 +0000 Subject: [PATCH] * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39943 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/flow.c | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6ef2430..f0ffdcc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2001-02-21 Richard Earnshaw + + * 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 * cppfiles.c: Update comments. diff --git a/gcc/flow.c b/gcc/flow.c index be14dad..9137db51 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -4667,7 +4667,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) int flags; { int regno_first = -1, regno_last = -1; - int not_dead = 0; + unsigned long not_dead = 0; int i; /* 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) || GET_CODE (reg) == STRICT_LOW_PART); if (GET_CODE (reg) == MEM) 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. */ case REG: @@ -4746,7 +4746,8 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) + 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); + not_dead = (unsigned long) REGNO_REG_SET_P (pbi->reg_live, + regno_first); reg = SUBREG_REG (reg); } @@ -4842,7 +4843,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) { for (i = regno_first; i <= regno_last; ++i) if (! mark_regno_cond_dead (pbi, i, cond)) - not_dead = 1; + not_dead |= ((unsigned long) 1) << (i - regno_first); } #endif @@ -4955,7 +4956,6 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) /* 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 @@ -4963,7 +4963,8 @@ mark_set_1 (pbi, code, reg, cond, insn, flags) && regno_first != STACK_POINTER_REGNUM) { 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) -- 2.7.4