Commit 298c28a8 by Jan Hubicka Committed by Jan Hubicka

flow.c (update_life_info): Allocate reg_deaths when called from scheudler.


	* flow.c (update_life_info): Allocate reg_deaths when called from
	scheudler.
	(attempt_auto_inc):  Update life ranges accordingly.

From-SVN: r77415
parent fbdf188d
2004-02-06 Jan Hubicka <jh@suse.cz>
* flow.c (update_life_info): Allocate reg_deaths when called from
scheudler.
(attempt_auto_inc): Update life ranges accordingly.
2004-02-06 Ulrich Weigand <uweigand@de.ibm.com> 2004-02-06 Ulrich Weigand <uweigand@de.ibm.com>
PR debug/11816 PR debug/11816
......
...@@ -627,6 +627,9 @@ update_life_info (sbitmap blocks, enum update_life_extent extent, int prop_flags ...@@ -627,6 +627,9 @@ update_life_info (sbitmap blocks, enum update_life_extent extent, int prop_flags
tmp = INITIALIZE_REG_SET (tmp_head); tmp = INITIALIZE_REG_SET (tmp_head);
ndead = 0; ndead = 0;
if ((prop_flags & PROP_REG_INFO) && !reg_deaths)
reg_deaths = xcalloc (sizeof (*reg_deaths), max_regno);
timevar_push ((extent == UPDATE_LIFE_LOCAL || blocks) timevar_push ((extent == UPDATE_LIFE_LOCAL || blocks)
? TV_LIFE_UPDATE : TV_LIFE); ? TV_LIFE_UPDATE : TV_LIFE);
...@@ -3376,16 +3379,16 @@ attempt_auto_inc (struct propagate_block_info *pbi, rtx inc, rtx insn, ...@@ -3376,16 +3379,16 @@ attempt_auto_inc (struct propagate_block_info *pbi, rtx inc, rtx insn,
incr_reg = q; incr_reg = q;
regno = REGNO (q); regno = REGNO (q);
if ((pbi->flags & PROP_REG_INFO)
&& !REGNO_REG_SET_P (pbi->reg_live, regno))
reg_deaths[regno] = pbi->insn_num;
/* REGNO is now used in INCR which is below INSN, but /* REGNO is now used in INCR which is below INSN, but
it previously wasn't live here. If we don't mark it previously wasn't live here. If we don't mark
it as live, we'll put a REG_DEAD note for it it as live, we'll put a REG_DEAD note for it
on this insn, which is incorrect. */ on this insn, which is incorrect. */
SET_REGNO_REG_SET (pbi->reg_live, regno); SET_REGNO_REG_SET (pbi->reg_live, regno);
/* We shall not do the autoinc during final pass. */
if (flags & PROP_REG_INFO)
abort ();
/* If there are any calls between INSN and INCR, show /* If there are any calls between INSN and INCR, show
that REGNO now crosses them. */ that REGNO now crosses them. */
for (temp = insn; temp != incr; temp = NEXT_INSN (temp)) for (temp = insn; temp != incr; temp = NEXT_INSN (temp))
...@@ -3417,14 +3420,21 @@ attempt_auto_inc (struct propagate_block_info *pbi, rtx inc, rtx insn, ...@@ -3417,14 +3420,21 @@ attempt_auto_inc (struct propagate_block_info *pbi, rtx inc, rtx insn,
/* If the original source was dead, it's dead now. */ /* If the original source was dead, it's dead now. */
rtx note; rtx note;
/* We shall not do the autoinc during final pass. */
if (flags & PROP_REG_INFO)
abort ();
while ((note = find_reg_note (incr, REG_DEAD, NULL_RTX)) != NULL_RTX) while ((note = find_reg_note (incr, REG_DEAD, NULL_RTX)) != NULL_RTX)
{ {
remove_note (incr, note); remove_note (incr, note);
if (XEXP (note, 0) != incr_reg) if (XEXP (note, 0) != incr_reg)
CLEAR_REGNO_REG_SET (pbi->reg_live, REGNO (XEXP (note, 0))); {
unsigned int regno = REGNO (XEXP (note, 0));
if ((pbi->flags & PROP_REG_INFO)
&& REGNO_REG_SET_P (pbi->reg_live, regno))
{
REG_LIVE_LENGTH (regno) += pbi->insn_num - reg_deaths[regno];
reg_deaths[regno] = 0;
}
CLEAR_REGNO_REG_SET (pbi->reg_live, REGNO (XEXP (note, 0)));
}
} }
PUT_CODE (incr, NOTE); PUT_CODE (incr, NOTE);
......
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