public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "abel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/42388] [4.5 Regression] ICE in move_bb_info with sel-sched and modulo-sched for 176.gcc Date: Thu, 24 Dec 2009 07:39:00 -0000 [thread overview] Message-ID: <20091224073924.7233.qmail@sourceware.org> (raw) In-Reply-To: <bug-42388-4503@http.gcc.gnu.org/bugzilla/> ------- Comment #3 from abel at gcc dot gnu dot org 2009-12-24 07:39 ------- The problem was that the failing assert is actually too strict, when an empty block is removed, its predecessor could be outside the region. After fixing this, I have also further robustified the function to expect empty blocks with no succs or preds, as this problem showed itself yet another time via the single failed test of the patch on ia64. * sel-sched-ir.c (maybe_tidy_empty_bb): Do not delete empty blocks that have no predecessors nor successors. Do not call move_bb_info for empty blocks outside of current region. --- gcc/sel-sched-ir.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 3c2989a..0950f2a 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -3519,12 +3519,15 @@ maybe_tidy_empty_bb (basic_block bb) bool rescan_p; /* Keep empty bb only if this block immediately precedes EXIT and - has incoming non-fallthrough edge. Otherwise remove it. */ + has incoming non-fallthrough edge, or it has no predecessors or + successors. Otherwise remove it. */ if (!sel_bb_empty_p (bb) || (single_succ_p (bb) && single_succ (bb) == EXIT_BLOCK_PTR && (!single_pred_p (bb) - || !(single_pred_edge (bb)->flags & EDGE_FALLTHRU)))) + || !(single_pred_edge (bb)->flags & EDGE_FALLTHRU))) + || EDGE_COUNT (bb->preds) == 0 + || EDGE_COUNT (bb->succs) == 0) return false; /* Do not attempt to redirect complex edges. */ @@ -3574,7 +3577,8 @@ maybe_tidy_empty_bb (basic_block bb) { gcc_assert (pred_bb != NULL); - move_bb_info (pred_bb, bb); + if (in_current_region_p (pred_bb)) + move_bb_info (pred_bb, bb); remove_empty_bb (bb, true); } -- abel at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abel at gcc dot gnu dot org, | |amonakov at gcc dot gnu dot | |org AssignedTo|unassigned at gcc dot gnu |abel at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2009-12-24 07:39:24 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42388
next prev parent reply other threads:[~2009-12-24 7:39 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-12-16 0:08 [Bug rtl-optimization/42388] New: " janis at gcc dot gnu dot org 2009-12-16 0:09 ` [Bug rtl-optimization/42388] " janis at gcc dot gnu dot org 2009-12-16 0:17 ` janis at gcc dot gnu dot org 2009-12-16 12:10 ` [Bug rtl-optimization/42388] [4.5 Regression] " rguenth at gcc dot gnu dot org 2009-12-24 7:39 ` abel at gcc dot gnu dot org [this message] 2010-01-02 16:01 ` rguenth at gcc dot gnu dot org 2010-01-14 11:03 ` abel at gcc dot gnu dot org 2010-01-14 11:08 ` abel at gcc dot gnu dot org 2010-02-07 4:47 ` hjl at gcc dot gnu dot org 2010-08-24 9:01 ` abel at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20091224073924.7233.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).