On 17/11/2011, at 9:58 PM, Tom de Vries wrote: > On 11/15/2011 10:07 PM, Maxim Kuvyrkov wrote: >> On 30/10/2011, at 8:17 AM, Tom de Vries wrote: >> >>> Richard, >>> >>> I have a tentative fix for PR50764. >> >> Richard, >> >> Tom's patch is good (with the comments below addressed), and I would >> appreciate you validating my review with your formal approval. >> > > Richard, > > Updated patch according to comments from Maxim. Added test-case. Bootstrapped > and reg-tested on x86_64. > > Ok for trunk? > > Thanks, > - Tom > ... > Index: gcc/sched-deps.c > =================================================================== > --- gcc/sched-deps.c (revision 181377) > +++ gcc/sched-deps.c (working copy) > @@ -2812,8 +2812,15 @@ sched_analyze_insn (struct deps_desc *de > during prologue generation and avoid marking the frame pointer setup > as frame-related at all. */ > if (RTX_FRAME_RELATED_P (insn)) > - deps->sched_before_next_jump > - = alloc_INSN_LIST (insn, deps->sched_before_next_jump); > + { > + /* Make sure prologue insn is scheduled before next jump. */ > + deps->sched_before_next_jump > + = alloc_INSN_LIST (insn, deps->sched_before_next_jump); > + > + /* Make sure epilogue insn is scheduled after preceding jumps. */ > + if (deps->pending_jump_insns)
You don't need this check, it's done anyway in add_dependence_list. [No need to resubmit or retest the patch after this change, it's trivial.] > + add_dependence_list (insn, deps->pending_jump_insns, 1, REG_DEP_ANTI); > + } > > if (code == COND_EXEC) > { Thank you, -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics