On Mon, Feb 25, 2013 at 10:51 PM, Eric Botcazou <ebotca...@adacore.com> wrote: >> That's what I believe, too. Still, combine appears to add REG_UNUSED >> notes for clobbers intentionally. Do you know why it does that? > > Hmm, right, it apparently clearly wants to immediately close the "live" ranges > it creates by adding new clobbers. And, indeed, regrename.c for example uses > these CLOBBER/REG_UNUSED pairs to compute live ranges for non-operands (the > pass does its own forward scan of the insn stream). So DF's choice might have > been made explicitly after all...
You mean this piece of nice code: /* Step 4: Close chains for registers that die here, unless the register is mentioned in a REG_UNUSED note. In that case we keep the chain open until step #7 below to ensure it conflicts with other output operands of this insn. See PR 52573. Arguably the insn should not have both notes; it has proven difficult to fix that without other undesirable side effects. */ for (note = REG_NOTES (insn); note; note = XEXP (note, 1)) if (REG_NOTE_KIND (note) == REG_DEAD && !find_regno_note (insn, REG_UNUSED, REGNO (XEXP (note, 0)))) { remove_from_hard_reg_set (&live_hard_regs, GET_MODE (XEXP (note, 0)), REGNO (XEXP (note, 0))); scan_rtx (insn, &XEXP (note, 0), NO_REGS, terminate_dead, OP_IN); } ? Good pointer, because it lead me to: http://gcc.gnu.org/PR52573#c6 which is the same patch as what I posted the other day. The code in regrename.c is a different "fix" for the same PR, and it looks to me like it's not the right fix... On top of the REG_EQ* work, I see more REG_* notes work for GCC 4.9 :-) Ciao! Steven