OSDN Git Service

* opts.h (struct cl_option): Add warn_message field.
[pf3gnuchains/gcc-fork.git] / gcc / cfg.c
index ee6af69..3a82d93 100644 (file)
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -57,6 +57,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "output.h"
 #include "function.h"
 #include "except.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "obstack.h"
@@ -84,13 +85,13 @@ void
 init_flow (struct function *the_fun)
 {
   if (!the_fun->cfg)
-    the_fun->cfg = GGC_CNEW (struct control_flow_graph);
+    the_fun->cfg = ggc_alloc_cleared_control_flow_graph ();
   n_edges_for_function (the_fun) = 0;
   ENTRY_BLOCK_PTR_FOR_FUNCTION (the_fun)
-    = GGC_CNEW (struct basic_block_def);
+    = ggc_alloc_cleared_basic_block_def ();
   ENTRY_BLOCK_PTR_FOR_FUNCTION (the_fun)->index = ENTRY_BLOCK;
   EXIT_BLOCK_PTR_FOR_FUNCTION (the_fun)
-    = GGC_CNEW (struct basic_block_def);
+    = ggc_alloc_cleared_basic_block_def ();
   EXIT_BLOCK_PTR_FOR_FUNCTION (the_fun)->index = EXIT_BLOCK;
   ENTRY_BLOCK_PTR_FOR_FUNCTION (the_fun)->next_bb
     = EXIT_BLOCK_PTR_FOR_FUNCTION (the_fun);
@@ -139,7 +140,7 @@ basic_block
 alloc_block (void)
 {
   basic_block bb;
-  bb = GGC_CNEW (struct basic_block_def);
+  bb = ggc_alloc_cleared_basic_block_def ();
   return bb;
 }
 
@@ -277,7 +278,7 @@ edge
 unchecked_make_edge (basic_block src, basic_block dst, int flags)
 {
   edge e;
-  e = GGC_CNEW (struct edge_def);
+  e = ggc_alloc_cleared_edge_def ();
   n_edges++;
 
   e->src = src;
@@ -734,7 +735,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 +766,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 +778,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;
 }
 
@@ -797,7 +798,7 @@ free_aux_for_blocks (void)
 /* Allocate a memory edge of SIZE as BB->aux.  The obstack must
    be first initialized by alloc_aux_for_edges.  */
 
-void
+static void
 alloc_aux_for_edge (edge e, int size)
 {
   /* Verify that aux field is clear.  */