OSDN Git Service

* Makefile.in (ifcvt.o): Add cfgloop.h.
[pf3gnuchains/gcc-fork.git] / gcc / cfgrtl.c
index 09e2e1c..da629cb 100644 (file)
@@ -936,9 +936,7 @@ redirect_branch_edge (edge e, basic_block target)
    stream.  */
 
 static bool
-rtl_redirect_edge_and_branch (e, target)
-     edge e;
-     basic_block target;
+rtl_redirect_edge_and_branch (edge e, basic_block target)
 {
   if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
     return false;
@@ -1038,19 +1036,16 @@ force_nonfallthru_and_redirect (edge e, basic_block target)
     {
       /* Create the new structures.  */
 
+      /* If the old block ended with a tablejump, skip its table
+        by searching forward from there.  Otherwise start searching
+        forward from the last instruction of the old block.  */
+      if (!tablejump_p (e->src->end, NULL, &note))
+       note = e->src->end;
+
       /* Position the new block correctly relative to loop notes.  */
-      note = last_loop_beg_note (e->src->end);
+      note = last_loop_beg_note (note);
       note = NEXT_INSN (note);
 
-      /* ... and ADDR_VECs.  */
-      if (note != NULL
-         && GET_CODE (note) == CODE_LABEL
-         && NEXT_INSN (note)
-         && GET_CODE (NEXT_INSN (note)) == JUMP_INSN
-         && (GET_CODE (PATTERN (NEXT_INSN (note))) == ADDR_DIFF_VEC
-             || GET_CODE (PATTERN (NEXT_INSN (note))) == ADDR_VEC))
-       note = NEXT_INSN (NEXT_INSN (note));
-
       jump_block = create_basic_block (note, NULL, e->src);
       jump_block->count = e->count;
       jump_block->frequency = EDGE_FREQUENCY (e);
@@ -1912,7 +1907,10 @@ rtl_verify_flow_info_1 (void)
          if (e->flags & EDGE_FALLTHRU)
            n_fallthru++, fallthru = e;
 
-         if ((e->flags & ~(EDGE_DFS_BACK | EDGE_CAN_FALLTHRU | EDGE_IRREDUCIBLE_LOOP)) == 0)
+         if ((e->flags & ~(EDGE_DFS_BACK
+                           | EDGE_CAN_FALLTHRU
+                           | EDGE_IRREDUCIBLE_LOOP
+                           | EDGE_LOOP_EXIT)) == 0)
            n_branch++;
 
          if (e->flags & EDGE_ABNORMAL_CALL)