OSDN Git Service

PR tree-optimization/53366
[pf3gnuchains/gcc-fork.git] / gcc / cfganal.c
index e0c6443..e27bbb2 100644 (file)
@@ -1,6 +1,6 @@
 /* Control flow graph analysis code for GNU compiler.
    Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008
+   1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -30,7 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "insn-config.h"
 #include "recog.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
 #include "tm_p.h"
 #include "vec.h"
 #include "vecprim.h"
@@ -389,7 +389,7 @@ free_edge_list (struct edge_list *elist)
 
 /* This function provides debug output showing an edge list.  */
 
-void
+DEBUG_FUNCTION void
 print_edge_list (FILE *f, struct edge_list *elist)
 {
   int x;
@@ -416,7 +416,7 @@ print_edge_list (FILE *f, struct edge_list *elist)
    verifying that all edges are present, and that there are no
    extra edges.  */
 
-void
+DEBUG_FUNCTION void
 verify_edge_list (FILE *f, struct edge_list *elist)
 {
   int pred, succ, index;
@@ -650,7 +650,7 @@ connect_infinite_loops_to_exit (void)
 }
 \f
 /* Compute reverse top sort order.  This is computing a post order
-   numbering of the graph.  If INCLUDE_ENTRY_EXIT is true, then then
+   numbering of the graph.  If INCLUDE_ENTRY_EXIT is true, then
    ENTRY_BLOCK and EXIT_BLOCK are included.  If DELETE_UNREACHABLE is
    true, unreachable blocks are deleted.  */
 
@@ -1256,7 +1256,7 @@ dfs_enumerate_from (basic_block bb, int reverse,
 
 
 static void
-compute_dominance_frontiers_1 (bitmap *frontiers)
+compute_dominance_frontiers_1 (bitmap_head *frontiers)
 {
   edge p;
   edge_iterator ei;
@@ -1275,10 +1275,9 @@ compute_dominance_frontiers_1 (bitmap *frontiers)
              domsb = get_immediate_dominator (CDI_DOMINATORS, b);
              while (runner != domsb)
                {
-                 if (bitmap_bit_p (frontiers[runner->index], b->index))
+                 if (!bitmap_set_bit (&frontiers[runner->index],
+                                      b->index))
                    break;
-                 bitmap_set_bit (frontiers[runner->index],
-                                 b->index);
                  runner = get_immediate_dominator (CDI_DOMINATORS,
                                                    runner);
                }
@@ -1289,7 +1288,7 @@ compute_dominance_frontiers_1 (bitmap *frontiers)
 
 
 void
-compute_dominance_frontiers (bitmap *frontiers)
+compute_dominance_frontiers (bitmap_head *frontiers)
 {
   timevar_push (TV_DOM_FRONTIERS);
 
@@ -1308,7 +1307,7 @@ compute_dominance_frontiers (bitmap *frontiers)
    allocated for the return value.  */
 
 bitmap
-compute_idf (bitmap def_blocks, bitmap *dfs)
+compute_idf (bitmap def_blocks, bitmap_head *dfs)
 {
   bitmap_iterator bi;
   unsigned bb_index, i;
@@ -1341,7 +1340,7 @@ compute_idf (bitmap def_blocks, bitmap *dfs)
         we may pull a non-existing block from the work stack.  */
       gcc_assert (bb_index < (unsigned) last_basic_block);
 
-      EXECUTE_IF_AND_COMPL_IN_BITMAP (dfs[bb_index], phi_insertion_points,
+      EXECUTE_IF_AND_COMPL_IN_BITMAP (&dfs[bb_index], phi_insertion_points,
                                      0, i, bi)
        {
          /* Use a safe push because if there is a definition of VAR