Also handle REG_XXX notes in spill_pseudos

PR rtl-optimization/59311
	* dwarf2cfi.c (dwf_regno): Assert reg isn't pseudo register.
	* lra-spills.c (spill_pseudos): Handle REG_XXX notes.

From-SVN: r205468
This commit is contained in:
H.J. Lu 2013-11-27 23:54:26 +00:00 committed by H.J. Lu
parent e7bd1de1d4
commit 362805fc2f
3 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2013-11-27 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/59311
* dwarf2cfi.c (dwf_regno): Assert reg isn't pseudo register.
* lra-spills.c (spill_pseudos): Handle REG_XXX notes.
2013-11-27 Eric Botcazou <ebotcazou@adacore.com>
* var-tracking.c (track_expr_p): Do not track declarations for parts

View File

@ -906,6 +906,7 @@ notice_eh_throw (rtx insn)
static inline unsigned
dwf_regno (const_rtx reg)
{
gcc_assert (REGNO (reg) < FIRST_PSEUDO_REGISTER);
return DWARF_FRAME_REGNUM (REGNO (reg));
}

View File

@ -477,9 +477,30 @@ spill_pseudos (void)
FOR_BB_INSNS (bb, insn)
if (bitmap_bit_p (&changed_insns, INSN_UID (insn)))
{
rtx *link_loc, link;
remove_pseudos (&PATTERN (insn), insn);
if (CALL_P (insn))
remove_pseudos (&CALL_INSN_FUNCTION_USAGE (insn), insn);
for (link_loc = &REG_NOTES (insn);
(link = *link_loc) != NULL_RTX;
link_loc = &XEXP (link, 1))
{
switch (REG_NOTE_KIND (link))
{
case REG_FRAME_RELATED_EXPR:
case REG_CFA_DEF_CFA:
case REG_CFA_ADJUST_CFA:
case REG_CFA_OFFSET:
case REG_CFA_REGISTER:
case REG_CFA_EXPRESSION:
case REG_CFA_RESTORE:
case REG_CFA_SET_VDRAP:
remove_pseudos (&XEXP (link, 0), insn);
break;
default:
break;
}
}
if (lra_dump_file != NULL)
fprintf (lra_dump_file,
"Changing spilled pseudos to memory in insn #%u\n",