OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / cfg.c
index 563582f..32615fb 100644 (file)
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -57,7 +57,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "output.h"
 #include "function.h"
 #include "except.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
 #include "tm_p.h"
 #include "obstack.h"
 #include "timevar.h"
@@ -402,8 +402,8 @@ redirect_edge_succ_nodup (edge e, basic_block new_succ)
       if (s->probability > REG_BR_PROB_BASE)
        s->probability = REG_BR_PROB_BASE;
       s->count += e->count;
-      remove_edge (e);
       redirect_edge_var_map_dup (s, e);
+      remove_edge (e);
       e = s;
     }
   else
@@ -549,6 +549,26 @@ dump_bb_info (basic_block bb, bool header, bool footer, int flags,
        fputs (", maybe hot", file);
       if (cfun && probably_never_executed_bb_p (bb))
        fputs (", probably never executed", file);
+      if (bb->flags)
+       {
+         static const char * const bits[] = {
+           "new", "reachable", "irr_loop", "superblock", "disable_sched",
+           "hot_partition", "cold_partition", "duplicated",
+           "non_local_goto_target", "rtl", "forwarder", "nonthreadable",
+           "modified"
+         };
+         unsigned int flags;
+
+         fputs (", flags:", file);
+         for (flags = bb->flags; flags ; flags &= flags - 1)
+           {
+             unsigned i = ctz_hwi (flags);
+             if (i < ARRAY_SIZE (bits))
+               fprintf (file, " %s", bits[i]);
+             else
+               fprintf (file, " <%d>", i);
+           }
+       }
       fputs (".\n", file);
 
       fprintf (file, "%sPredecessors: ", prefix);
@@ -700,7 +720,7 @@ dump_edge_info (FILE *file, edge e, int do_succ)
       static const char * const bitnames[] = {
        "fallthru", "ab", "abcall", "eh", "fake", "dfs_back",
        "can_fallthru", "irreducible", "sibcall", "loop_exit",
-       "true", "false", "exec"
+       "true", "false", "exec", "crossing", "preserve"
       };
       int comma = 0;
       int i, flags = e->flags;
@@ -734,7 +754,7 @@ static void *first_edge_aux_obj = 0;
 /* Allocate a memory block of SIZE as BB->aux.  The obstack must
    be first initialized by alloc_aux_for_blocks.  */
 
-void
+static void
 alloc_aux_for_block (basic_block bb, int size)
 {
   /* Verify that aux field is clear.  */
@@ -765,7 +785,7 @@ alloc_aux_for_blocks (int size)
     {
       basic_block bb;
 
-      FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
+      FOR_ALL_BB (bb)
        alloc_aux_for_block (bb, size);
     }
 }
@@ -777,7 +797,7 @@ clear_aux_for_blocks (void)
 {
   basic_block bb;
 
-  FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
+  FOR_ALL_BB (bb)
     bb->aux = NULL;
 }
 
@@ -794,7 +814,7 @@ free_aux_for_blocks (void)
   clear_aux_for_blocks ();
 }
 
-/* Allocate a memory edge of SIZE as BB->aux.  The obstack must
+/* Allocate a memory edge of SIZE as E->aux.  The obstack must
    be first initialized by alloc_aux_for_edges.  */
 
 void