Commit 3a6191b1 by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/43479 (Missing DW_TAG_lexical_block+DW_TAG_variable)

	PR debug/43479
	* ira.c (adjust_cleared_regs): New function.
	(update_equiv_regs): Adjust cleared_regs in DEBUG_INSNs.

From-SVN: r157702
parent bff0b1a6
2010-03-24 Jakub Jelinek <jakub@redhat.com>
PR debug/43479
* ira.c (adjust_cleared_regs): New function.
(update_equiv_regs): Adjust cleared_regs in DEBUG_INSNs.
PR debug/19192
PR debug/43479
* cfgexpand.c (gimple_assign_rhs_to_tree): Also set TREE_BLOCK
......
/* Integrated Register Allocator (IRA) entry point.
Copyright (C) 2006, 2007, 2008, 2009
Copyright (C) 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Vladimir Makarov <vmakarov@redhat.com>.
......@@ -2282,6 +2282,22 @@ no_equiv (rtx reg, const_rtx store ATTRIBUTE_UNUSED, void *data ATTRIBUTE_UNUSED
}
}
/* In DEBUG_INSN location adjust REGs from CLEARED_REGS bitmap to the
equivalent replacement. */
static rtx
adjust_cleared_regs (rtx loc, const_rtx old_rtx ATTRIBUTE_UNUSED, void *data)
{
if (REG_P (loc))
{
bitmap cleared_regs = (bitmap) data;
if (bitmap_bit_p (cleared_regs, REGNO (loc)))
return simplify_replace_fn_rtx (*reg_equiv[REGNO (loc)].src_p,
NULL_RTX, adjust_cleared_regs, data);
}
return NULL_RTX;
}
/* Nonzero if we recorded an equivalence for a LABEL_REF. */
static int recorded_label_ref;
......@@ -2717,13 +2733,29 @@ update_equiv_regs (void)
}
if (!bitmap_empty_p (cleared_regs))
FOR_EACH_BB (bb)
{
bitmap_and_compl_into (DF_LIVE_IN (bb), cleared_regs);
bitmap_and_compl_into (DF_LIVE_OUT (bb), cleared_regs);
bitmap_and_compl_into (DF_LR_IN (bb), cleared_regs);
bitmap_and_compl_into (DF_LR_OUT (bb), cleared_regs);
}
{
FOR_EACH_BB (bb)
{
bitmap_and_compl_into (DF_LIVE_IN (bb), cleared_regs);
bitmap_and_compl_into (DF_LIVE_OUT (bb), cleared_regs);
bitmap_and_compl_into (DF_LR_IN (bb), cleared_regs);
bitmap_and_compl_into (DF_LR_OUT (bb), cleared_regs);
}
/* Last pass - adjust debug insns referencing cleared regs. */
if (MAY_HAVE_DEBUG_INSNS)
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
if (DEBUG_INSN_P (insn))
{
rtx old_loc = INSN_VAR_LOCATION_LOC (insn);
INSN_VAR_LOCATION_LOC (insn)
= simplify_replace_fn_rtx (old_loc, NULL_RTX,
adjust_cleared_regs,
(void *) cleared_regs);
if (old_loc != INSN_VAR_LOCATION_LOC (insn))
df_insn_rescan (insn);
}
}
BITMAP_FREE (cleared_regs);
......
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