On Mon, Sep 12, 2016 at 11:24:01AM -0600, Jeff Law wrote: > >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?
An interesting plan, I'll try. Segher