diff mbox

[PR46602] sel-sched: move toporder checking

Message ID alpine.LNX.2.00.1011241259000.6883@monoid.intra.ispras.ru
State New
Headers show

Commit Message

Alexander Monakov Nov. 24, 2010, 10:29 a.m. UTC
Hi,

After the fix for PR 46204, we can enter maybe_tidy_empty_bb with invalid
topological order, but will make no attempt to recompute it (instead the caller,
tidy_control_flow, will do it later).  That leads to an ICE in verify_backedges.

Rather than bringing back some complexity into maybe_tidy_empty_bb to allow it
to recompute toporder again, I'd like to move verify_backedges into the caller
that creates edges between unrelated BBs, thus breaking toporder.

Bootstrapped and regtested on x86_64-linux, ia64-linux (+ with sel-sched
enabled at -O2), OK for trunk?

2010-11-24  Alexander Monakov  <amonakov@ispras.ru>

	PR rtl-optimization/46602
	* sel-sched-ir.c (maybe_tidy_empty_bb): Move checking ...
	(tidy_control_flow): Here.

Comments

Vladimir Makarov Nov. 24, 2010, 7:05 p.m. UTC | #1
On 11/24/2010 05:29 AM, Alexander Monakov wrote:
> Hi,
>
> After the fix for PR 46204, we can enter maybe_tidy_empty_bb with invalid
> topological order, but will make no attempt to recompute it (instead the caller,
> tidy_control_flow, will do it later).  That leads to an ICE in verify_backedges.
>
> Rather than bringing back some complexity into maybe_tidy_empty_bb to allow it
> to recompute toporder again, I'd like to move verify_backedges into the caller
> that creates edges between unrelated BBs, thus breaking toporder.
>
> Bootstrapped and regtested on x86_64-linux, ia64-linux (+ with sel-sched
> enabled at -O2), OK for trunk?
>
> 2010-11-24  Alexander Monakov<amonakov@ispras.ru>
>
> 	PR rtl-optimization/46602
> 	* sel-sched-ir.c (maybe_tidy_empty_bb): Move checking ...
> 	(tidy_control_flow): Here.
>
>
OK, thanks for the patch.
diff mbox

Patch

diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index 71c02c4..231358b 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -3650,10 +3650,6 @@  maybe_tidy_empty_bb (basic_block bb)
       remove_empty_bb (bb, true);
     }
 
-#ifdef ENABLE_CHECKING
-  verify_backedges ();
-#endif
-
   return true;
 }
 
@@ -3735,6 +3731,11 @@  tidy_control_flow (basic_block xbb, bool full_tidying)
       if (recompute_toporder_p)
 	sel_recompute_toporder ();
     }
+
+#ifdef ENABLE_CHECKING
+  verify_backedges ();
+#endif
+
   return changed;
 }