re PR middle-end/20557 (FAIL: gcc.dg/pr18628.c)
authorRoger Sayle <roger@eyesopen.com>
Mon, 21 Mar 2005 22:11:11 +0000 (22:11 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Mon, 21 Mar 2005 22:11:11 +0000 (22:11 +0000)
PR middle-end/20557
* bb-reorder.c (duplicate_computed_gotos): Use can_duplicate_block_p
to determine whether a block can be duplicated, rather than test
whether the block contains noncopyable insns ourselves.

From-SVN: r96836

gcc/ChangeLog
gcc/bb-reorder.c

index 0e9becd8de2dceb9de8fc1bf88c60da0e810305a..c0b07e314b0225c7f24ca49fef445acbb2e72ef0 100644 (file)
@@ -1,3 +1,10 @@
+2005-03-21  Roger Sayle  <roger@eyesopen.com>
+
+       PR middle-end/20557
+       * bb-reorder.c (duplicate_computed_gotos): Use can_duplicate_block_p
+       to determine whether a block can be duplicated, rather than test
+       whether the block contains noncopyable insns ourselves.
+
 2005-03-21  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/i860/i860.h (PREDICATE_CODES): Remove nonexistent
index a94c9e4e4688fdfdd65362e4f396e6d5762e2c11..b7223d7d1aa725c48e0357ef4a67ec5c8e5c1900 100644 (file)
@@ -2047,24 +2047,15 @@ duplicate_computed_gotos (void)
          int size = 0;
 
          FOR_BB_INSNS (bb, insn)
-           {
-             if (INSN_P (insn))
-               {
-                 /* If the insn isn't copyable, don't duplicate
-                    the block.  */
-                 if (targetm.cannot_copy_insn_p
-                     && targetm.cannot_copy_insn_p (insn))
-                   {
-                     size = max_size + 1;
-                     break;
-                   }
-                 size += get_attr_length (insn);
-               }
-             if (size > max_size)
-               break;
-           }
+           if (INSN_P (insn))
+             {
+               size += get_attr_length (insn);
+               if (size > max_size)
+                 break;
+             }
 
-         if (size <= max_size)
+         if (size <= max_size
+             && can_duplicate_block_p (bb))
            bitmap_set_bit (candidates, bb->index);
        }
     }