On 09/09/2016 03:13 PM, Segher Boessenkool wrote:
On Thu, Sep 08, 2016 at 11:54:33AM -0600, Jeff Law wrote:
On 07/31/2016 07:42 PM, Segher Boessenkool wrote:
If selective scheduling copies register restores it confuses dwarf2cfi.
2016-06-07 Segher Boessenkool <seg...@kernel.crashing.org>
* sel-sched-ir.c (init_global_and_expr_for_insn): Don't copy
instructions with a REG_CFA_RESTORE note.
Similarly, I think you're papering over a lifetime problem of some kind
here.
sel-sched-ir.c says
/* Certain instructions cannot be cloned, and frame related insns and
the insn adjacent to NOTE_INSN_EPILOGUE_BEG cannot be moved out of
their block. */
if (prologue_epilogue_contains (insn))
...
and I'm just extending that to "epilogue" instructions not in the
"epilogue" ;-)
If all such epilogue instructions always had a REG_CFA_RESTORE note,
we could drop the "old" thing; but even instructions restoring a register
do not always have such a note (they can be batched up, and they can be
not emitted at all if not shrink-wrapping).
Can you fix this by registering the separate prologue/epilogue insns in
prologue_insn_hash and epilogue_insn_hash or does that have unintended
consequences?
Jeff