OSDN Git Service

PR bootstrap/48000
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Mar 2011 16:41:53 +0000 (16:41 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Mar 2011 16:41:53 +0000 (16:41 +0000)
* cfgloopmanip.c (fix_bb_placements): Return immediately
if FROM is BASE_LOOP's header.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170740 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cfgloopmanip.c

index 5b7a188..0b6a15b 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 3802f9c..1824421 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);