Message ID | CABu31nMsgQDvK1jWM=u-o0fWwDMuS3GFE3aFG9MR6C9xmjmzLw@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Tue, Sep 6, 2011 at 11:31 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote: > Index: haifa-sched.c > =================================================================== > --- haifa-sched.c (revision 178601) > +++ haifa-sched.c (working copy) > @@ -6071,7 +6071,10 @@ check_cfg (rtx head, rtx tail) > /* Or jump to the next instruction. */ > || (EDGE_COUNT (bb->succs) == 1 > && (BB_HEAD (EDGE_I (bb->succs, 0)->dest) > - == JUMP_LABEL (head)))); > + == JUMP_LABEL (head))) > + /* Or the jump is not just a jump. */ > + || (!onlyjump_p (head) > + || returnjump_p (head))); > } > if (BB_END (bb) == head) > { > BTW that's one ugly gcc_assert. Candidate for gcc_checking_assert? Ciao! Steven
On 7/09/2011, at 9:32 AM, Steven Bosscher wrote: > On Tue, Sep 6, 2011 at 11:31 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote: >> Index: haifa-sched.c >> =================================================================== >> --- haifa-sched.c (revision 178601) >> +++ haifa-sched.c (working copy) >> @@ -6071,7 +6071,10 @@ check_cfg (rtx head, rtx tail) >> /* Or jump to the next instruction. */ >> || (EDGE_COUNT (bb->succs) == 1 >> && (BB_HEAD (EDGE_I (bb->succs, 0)->dest) >> - == JUMP_LABEL (head)))); >> + == JUMP_LABEL (head))) >> + /* Or the jump is not just a jump. */ >> + || (!onlyjump_p (head) >> + || returnjump_p (head))); >> } >> if (BB_END (bb) == head) >> { >> > > BTW that's one ugly gcc_assert. Candidate for gcc_checking_assert? I agree. I would rather remove the entirety of haifa-sched.c: check_cfg(); scheduler is not the right place for checking consistency of CFG. Check_cfg() was useful for debugging scheduler patches, but now it is more of maintainance overhead. Do I have a second vote for removal of check_cfg()? -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics
On 09/06/11 23:56, Maxim Kuvyrkov wrote: > I agree. I would rather remove the entirety of haifa-sched.c: > check_cfg(); scheduler is not the right place for checking > consistency of CFG. Check_cfg() was useful for debugging scheduler > patches, but now it is more of maintainance overhead. > > Do I have a second vote for removal of check_cfg()? I'd be OK with that. Saves me some time adapting it to some scheduler patches I'll be submitting soon... Bernd
On 9/09/2011, at 6:54 AM, Bernd Schmidt wrote: > On 09/06/11 23:56, Maxim Kuvyrkov wrote: >> I agree. I would rather remove the entirety of haifa-sched.c: >> check_cfg(); scheduler is not the right place for checking >> consistency of CFG. Check_cfg() was useful for debugging scheduler >> patches, but now it is more of maintainance overhead. >> >> Do I have a second vote for removal of check_cfg()? > > I'd be OK with that. Saves me some time adapting it to some scheduler > patches I'll be submitting soon... OK then, attached is the trivial patch that removes haifa-sched.c:check_cfg(). Please let me know if you have strong feelings towards keeping check_cfg(). Tested on x86_64-linux-gnu. Absent any requests to the contrary, I will check in this patch in 2 days. Thank you, -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics
On 14/09/2011, at 7:40 AM, Maxim Kuvyrkov wrote: > > OK then, attached is the trivial patch that removes haifa-sched.c:check_cfg(). Please let me know if you have strong feelings towards keeping check_cfg(). > > Tested on x86_64-linux-gnu. Absent any requests to the contrary, I will check in this patch in 2 days. Checked in. -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics
Index: haifa-sched.c =================================================================== --- haifa-sched.c (revision 178601) +++ haifa-sched.c (working copy) @@ -6071,7 +6071,10 @@ check_cfg (rtx head, rtx tail) /* Or jump to the next instruction. */ || (EDGE_COUNT (bb->succs) == 1 && (BB_HEAD (EDGE_I (bb->succs, 0)->dest) - == JUMP_LABEL (head)))); + == JUMP_LABEL (head))) + /* Or the jump is not just a jump. */ + || (!onlyjump_p (head) + || returnjump_p (head))); } if (BB_END (bb) == head) {