On 10/17/11 19:43, Eric Botcazou wrote: >> Yes. However, in the case that caused the PR, this was attempted with >> reload_completed == 0, so we cannot generate return patterns anyway and >> must fail. > > OK, but we clean up the CFG after reload is completed (e.g. just before > emitting the prologue) so in this case we can generate return patterns.
thread_prologue_and_epilogue_insns should detect all cases where a return insn can be created. So any CFG cleanup that runs before it does not need this functionality. Bernd