re PR bootstrap/48000 (LTO bootstrap failed with bootstrap-profiled)
authorZdenek Dvorak <ook@ucw.cz>
Mon, 7 Mar 2011 16:41:53 +0000 (17:41 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 7 Mar 2011 16:41:53 +0000 (17:41 +0100)
PR bootstrap/48000
* cfgloopmanip.c (fix_bb_placements): Return immediately
if FROM is BASE_LOOP's header.

From-SVN: r170740

gcc/ChangeLog
gcc/cfgloopmanip.c

index 5b7a188e11f8c57d58f9a8b7cc6173c05b228895..0b6a15ba0d8e609457e4ea4354bea1ea7f611586 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2011-03-07  Paul Wögerer  <paul_woegerer@mentor.com>
 
        * gimplify.c (gimplify_function_tree): Fix building calls
index 3802f9cff12d5439126d46e9f7d211b811e6e4ed..1824421f61689946723179498b38289fb7c190a3 100644 (file)
@@ -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);