diff mbox

[committed] Fix profiledbootstrap on x86_64-linux (PR bootstrap/48000)

Message ID 20110307164332.GW30899@tyan-ft48-01.lab.bos.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek March 7, 2011, 4:43 p.m. UTC
Hi!

I've bootstrapped/regtested and profiledbootstrapped/regtested
the following patch from Zdenek on x86_64-linux and i686-linux
and with richi's approval from IRC committed to trunk.

2011-03-07  Zdenek Dvorak  <ook@ucw.cz>

	PR bootstrap/48000
	* cfgloopmanip.c (fix_bb_placements): Return immediately
	if FROM is BASE_LOOP's header.


	Jakub
diff mbox

Patch

--- gcc/cfgloopmanip.c	(revision 170739)
+++ gcc/cfgloopmanip.c	(working copy)
@@ -185,7 +185,11 @@  fix_bb_placements (basic_block from,
      fix_loop_placement.  */
 
   base_loop = from->loop_father;
-  if (base_loop == current_loops->tree_root)
+  /* If we are already in the outermost loop, the basic blocks cannot be moved
+     outside of it.  If FROM is the header of the base loop, it cannot be moved
+     outside of it, either.  In both cases, we can end now.  */
+  if (base_loop == current_loops->tree_root
+      || from == base_loop->header)
     return;
 
   in_queue = sbitmap_alloc (last_basic_block);