Makefile.in (cgraphunit.o): Add $(EXCEPT_H) dependency.
authorRichard Guenther <rguenther@suse.de>
Thu, 12 Apr 2012 15:11:17 +0000 (15:11 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 12 Apr 2012 15:11:17 +0000 (15:11 +0000)
2012-04-12  Richard Guenther  <rguenther@suse.de>

* Makefile.in (cgraphunit.o): Add $(EXCEPT_H) dependency.
* cgraph.h (tree_rest_of_compilation): Remove.
* cgraph.c (cgraph_add_new_function): Move ...
* cgraphunit.c (cgraph_add_new_function): ... here.
(tree_rest_of_compilation): Make static.
(cgraph_expand_function): Do not set cgraph_function_flags_ready.
* tree-optimize.c (gate_all_optimizations, pass_all_optimizations,
gate_all_early_local_passes, execute_all_early_local_passes,
pass_early_local_passes, gate_all_early_optimizations,
pass_all_early_optimizations): Move ...
* passes.c (gate_all_optimizations, pass_all_optimizations,
gate_all_early_local_passes, execute_all_early_local_passes,
pass_early_local_passes, gate_all_early_optimizations,
pass_all_early_optimizations): ... here.
* tree-optimize.c (execute_free_datastructures): Remove.
* tree-flow.h (execute_free_datastructures): Remove.
* tree-optimize.c (execute_init_datastructures,
pass_init_datastructures): Move ...
* tree-ssa.c (execute_init_datastructures,
pass_init_datastructures): ... here.
* cfgexpand.c (gimple_expand_cfg): Inline-expand call to
execute_free_datastructures.

From-SVN: r186381

gcc/ChangeLog
gcc/Makefile.in
gcc/cfgexpand.c
gcc/cgraph.c
gcc/cgraph.h
gcc/cgraphunit.c
gcc/passes.c
gcc/tree-flow.h
gcc/tree-optimize.c
gcc/tree-ssa.c

index a1dad36b367407a62cb42f46c47cf670567c292e..dbaf800433ff323d865118da67c30733df680d48 100644 (file)
@@ -1,3 +1,28 @@
+2012-04-12  Richard Guenther  <rguenther@suse.de>
+
+       * Makefile.in (cgraphunit.o): Add $(EXCEPT_H) dependency.
+       * cgraph.h (tree_rest_of_compilation): Remove.
+       * cgraph.c (cgraph_add_new_function): Move ...
+       * cgraphunit.c (cgraph_add_new_function): ... here.
+       (tree_rest_of_compilation): Make static.
+       (cgraph_expand_function): Do not set cgraph_function_flags_ready.
+       * tree-optimize.c (gate_all_optimizations, pass_all_optimizations,
+       gate_all_early_local_passes, execute_all_early_local_passes,
+       pass_early_local_passes, gate_all_early_optimizations,
+       pass_all_early_optimizations): Move ...
+       * passes.c (gate_all_optimizations, pass_all_optimizations,
+       gate_all_early_local_passes, execute_all_early_local_passes,
+       pass_early_local_passes, gate_all_early_optimizations,
+       pass_all_early_optimizations): ... here.
+       * tree-optimize.c (execute_free_datastructures): Remove.
+       * tree-flow.h (execute_free_datastructures): Remove.
+       * tree-optimize.c (execute_init_datastructures,
+       pass_init_datastructures): Move ...
+       * tree-ssa.c (execute_init_datastructures,
+       pass_init_datastructures): ... here.
+       * cfgexpand.c (gimple_expand_cfg): Inline-expand call to
+       execute_free_datastructures.
+
 2012-04-12  Bernd Schmidt  <bernds@codesourcery.com>
 
        * dbgcnt.def (ira_move): New counter.
index 408182a648ad6728b93184886a7788fcf595d2f9..0f87ea36a697b3896a6dfa8711d8568af48e85cf 100644 (file)
@@ -2922,7 +2922,7 @@ cgraphunit.o : cgraphunit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(FIBHEAP_H) output.h $(PARAMS_H) $(RTL_H) $(TIMEVAR_H) $(IPA_PROP_H) \
    gt-cgraphunit.h tree-iterator.h $(COVERAGE_H) $(TREE_DUMP_H) \
    tree-pretty-print.h gimple-pretty-print.h ipa-inline.h $(IPA_UTILS_H) \
-   $(LTO_STREAMER_H) output.h $(REGSET_H)
+   $(LTO_STREAMER_H) output.h $(REGSET_H) $(EXCEPT_H)
 cgraphbuild.o : cgraphbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(TREE_H) langhooks.h $(CGRAPH_H) intl.h pointer-set.h $(GIMPLE_H) \
    $(TREE_FLOW_H) $(TREE_PASS_H) $(IPA_UTILS_H) $(EXCEPT_H) \
index d148853143b3b3ac8964c3c4453a75608b3cd406..0c027e298bc90905c9e484ebb26e1c63b159f477 100644 (file)
@@ -4555,7 +4555,11 @@ gimple_expand_cfg (void)
   if (MAY_HAVE_DEBUG_INSNS)
     expand_debug_locations ();
 
-  execute_free_datastructures ();
+  /* Free stuff we no longer need after GIMPLE optimizations.  */
+  free_dominance_info (CDI_DOMINATORS);
+  free_dominance_info (CDI_POST_DOMINATORS);
+  delete_tree_cfg_annotations ();
+
   timevar_push (TV_OUT_OF_SSA);
   finish_out_of_ssa (&SA);
   timevar_pop (TV_OUT_OF_SSA);
index 61a8e235fe30690844e43265f3588217f183c722..9a2c491a28e442e4bc49e27a56df4b2ea715beb6 100644 (file)
@@ -2397,89 +2397,6 @@ cgraph_function_body_availability (struct cgraph_node *node)
   return avail;
 }
 
-/* Add the function FNDECL to the call graph.
-   Unlike cgraph_finalize_function, this function is intended to be used
-   by middle end and allows insertion of new function at arbitrary point
-   of compilation.  The function can be either in high, low or SSA form
-   GIMPLE.
-
-   The function is assumed to be reachable and have address taken (so no
-   API breaking optimizations are performed on it).
-
-   Main work done by this function is to enqueue the function for later
-   processing to avoid need the passes to be re-entrant.  */
-
-void
-cgraph_add_new_function (tree fndecl, bool lowered)
-{
-  struct cgraph_node *node;
-  switch (cgraph_state)
-    {
-      case CGRAPH_STATE_CONSTRUCTION:
-       /* Just enqueue function to be processed at nearest occurrence.  */
-       node = cgraph_create_node (fndecl);
-       node->next_needed = cgraph_new_nodes;
-       if (lowered)
-         node->lowered = true;
-       cgraph_new_nodes = node;
-        break;
-
-      case CGRAPH_STATE_IPA:
-      case CGRAPH_STATE_IPA_SSA:
-      case CGRAPH_STATE_EXPANSION:
-       /* Bring the function into finalized state and enqueue for later
-          analyzing and compilation.  */
-       node = cgraph_get_create_node (fndecl);
-       node->local.local = false;
-       node->local.finalized = true;
-       node->reachable = node->needed = true;
-       if (!lowered && cgraph_state == CGRAPH_STATE_EXPANSION)
-         {
-           push_cfun (DECL_STRUCT_FUNCTION (fndecl));
-           current_function_decl = fndecl;
-           gimple_register_cfg_hooks ();
-           bitmap_obstack_initialize (NULL);
-           execute_pass_list (all_lowering_passes);
-           execute_pass_list (pass_early_local_passes.pass.sub);
-           bitmap_obstack_release (NULL);
-           pop_cfun ();
-           current_function_decl = NULL;
-
-           lowered = true;
-         }
-       if (lowered)
-         node->lowered = true;
-       node->next_needed = cgraph_new_nodes;
-       cgraph_new_nodes = node;
-        break;
-
-      case CGRAPH_STATE_FINISHED:
-       /* At the very end of compilation we have to do all the work up
-          to expansion.  */
-       node = cgraph_create_node (fndecl);
-       if (lowered)
-         node->lowered = true;
-       cgraph_analyze_function (node);
-       push_cfun (DECL_STRUCT_FUNCTION (fndecl));
-       current_function_decl = fndecl;
-       gimple_register_cfg_hooks ();
-       bitmap_obstack_initialize (NULL);
-       if (!gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl)))
-         execute_pass_list (pass_early_local_passes.pass.sub);
-       bitmap_obstack_release (NULL);
-       tree_rest_of_compilation (node);
-       pop_cfun ();
-       current_function_decl = NULL;
-       break;
-    }
-
-  /* Set a personality if required and we already passed EH lowering.  */
-  if (lowered
-      && (function_needs_eh_personality (DECL_STRUCT_FUNCTION (fndecl))
-         == eh_personality_lang))
-    DECL_FUNCTION_PERSONALITY (fndecl) = lang_hooks.eh_personality ();
-}
-
 /* Worker for cgraph_node_can_be_local_p.  */
 static bool
 cgraph_node_cannot_be_local_p_1 (struct cgraph_node *node,
index 8740fba7c4731d83254802344e2dfc7be24a7940..8c0c882ac8b3c797a6647f096e9c37735684b7e4 100644 (file)
@@ -583,7 +583,6 @@ void cgraph_mark_if_needed (tree);
 void cgraph_analyze_function (struct cgraph_node *);
 void cgraph_finalize_compilation_unit (void);
 void cgraph_optimize (void);
-void tree_rest_of_compilation (struct cgraph_node *);
 void cgraph_mark_needed_node (struct cgraph_node *);
 void cgraph_mark_address_taken_node (struct cgraph_node *);
 void cgraph_mark_reachable_node (struct cgraph_node *);
index 9d2c46c374ef8b7c0fbadd72afb221ad537669b7..f603bf500ffbc24a7fda7e7804e23058ec207338 100644 (file)
@@ -142,12 +142,14 @@ along with GCC; see the file COPYING3.  If not see
 #include "ipa-inline.h"
 #include "ipa-utils.h"
 #include "lto-streamer.h"
+#include "except.h"
 #include "regset.h"     /* FIXME: For reg_obstack.  */
 
 static void cgraph_expand_all_functions (void);
 static void cgraph_mark_functions_to_output (void);
 static void cgraph_expand_function (struct cgraph_node *);
 static void cgraph_output_pending_asms (void);
+static void tree_rest_of_compilation (struct cgraph_node *);
 
 FILE *cgraph_dump_file;
 
@@ -365,6 +367,92 @@ cgraph_finalize_function (tree decl, bool nested)
     ggc_collect ();
 }
 
+/* Add the function FNDECL to the call graph.
+   Unlike cgraph_finalize_function, this function is intended to be used
+   by middle end and allows insertion of new function at arbitrary point
+   of compilation.  The function can be either in high, low or SSA form
+   GIMPLE.
+
+   The function is assumed to be reachable and have address taken (so no
+   API breaking optimizations are performed on it).
+
+   Main work done by this function is to enqueue the function for later
+   processing to avoid need the passes to be re-entrant.  */
+
+void
+cgraph_add_new_function (tree fndecl, bool lowered)
+{
+  struct cgraph_node *node;
+  switch (cgraph_state)
+    {
+      case CGRAPH_STATE_CONSTRUCTION:
+       /* Just enqueue function to be processed at nearest occurrence.  */
+       node = cgraph_create_node (fndecl);
+       node->next_needed = cgraph_new_nodes;
+       if (lowered)
+         node->lowered = true;
+       cgraph_new_nodes = node;
+        break;
+
+      case CGRAPH_STATE_IPA:
+      case CGRAPH_STATE_IPA_SSA:
+      case CGRAPH_STATE_EXPANSION:
+       /* Bring the function into finalized state and enqueue for later
+          analyzing and compilation.  */
+       node = cgraph_get_create_node (fndecl);
+       node->local.local = false;
+       node->local.finalized = true;
+       node->reachable = node->needed = true;
+       if (!lowered && cgraph_state == CGRAPH_STATE_EXPANSION)
+         {
+           push_cfun (DECL_STRUCT_FUNCTION (fndecl));
+           current_function_decl = fndecl;
+           gimple_register_cfg_hooks ();
+           bitmap_obstack_initialize (NULL);
+           execute_pass_list (all_lowering_passes);
+           execute_pass_list (pass_early_local_passes.pass.sub);
+           bitmap_obstack_release (NULL);
+           pop_cfun ();
+           current_function_decl = NULL;
+
+           lowered = true;
+         }
+       if (lowered)
+         node->lowered = true;
+       node->next_needed = cgraph_new_nodes;
+       cgraph_new_nodes = node;
+        break;
+
+      case CGRAPH_STATE_FINISHED:
+       /* At the very end of compilation we have to do all the work up
+          to expansion.  */
+       node = cgraph_create_node (fndecl);
+       if (lowered)
+         node->lowered = true;
+       cgraph_analyze_function (node);
+       push_cfun (DECL_STRUCT_FUNCTION (fndecl));
+       current_function_decl = fndecl;
+       gimple_register_cfg_hooks ();
+       bitmap_obstack_initialize (NULL);
+       if (!gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl)))
+         execute_pass_list (pass_early_local_passes.pass.sub);
+       bitmap_obstack_release (NULL);
+       tree_rest_of_compilation (node);
+       pop_cfun ();
+       current_function_decl = NULL;
+       break;
+
+      default:
+       gcc_unreachable ();
+    }
+
+  /* Set a personality if required and we already passed EH lowering.  */
+  if (lowered
+      && (function_needs_eh_personality (DECL_STRUCT_FUNCTION (fndecl))
+         == eh_personality_lang))
+    DECL_FUNCTION_PERSONALITY (fndecl) = lang_hooks.eh_personality ();
+}
+
 /* C99 extern inline keywords allow changing of declaration after function
    has been finalized.  We need to re-decide if we want to mark the function as
    needed then.   */
@@ -1770,10 +1858,10 @@ assemble_thunks_and_aliases (struct cgraph_node *node)
       }
 }
 
-/* For functions-as-trees languages, this performs all optimization and
-   compilation for FNDECL.  */
+/* Perform IPA transforms and all further optimizations and compilation
+   for FNDECL.  */
 
-void
+static void
 tree_rest_of_compilation (struct cgraph_node *node)
 {
   tree fndecl = node->decl;
@@ -1891,8 +1979,6 @@ cgraph_expand_function (struct cgraph_node *node)
   /* Eliminate all call edges.  This is important so the GIMPLE_CALL no longer
      points to the dead function body.  */
   cgraph_node_remove_callees (node);
-
-  cgraph_function_flags_ready = true;
 }
 
 /* Return true when CALLER_DECL should be inlined into CALLEE_DECL.  */
index 0cb97a501533949db81d3b6267dc0a533f42de00..ad9307042995e828919bba09d657c5fceffe7431 100644 (file)
@@ -281,6 +281,107 @@ finish_optimization_passes (void)
   timevar_pop (TV_DUMP);
 }
 
+static unsigned int
+execute_all_early_local_passes (void)
+{
+  /* Once this pass (and its sub-passes) are complete, all functions
+     will be in SSA form.  Technically this state change is happening
+     a tad early, since the sub-passes have not yet run, but since
+     none of the sub-passes are IPA passes and do not create new
+     functions, this is ok.  We're setting this value for the benefit
+     of IPA passes that follow.  */
+  if (cgraph_state < CGRAPH_STATE_IPA_SSA)
+    cgraph_state = CGRAPH_STATE_IPA_SSA;
+  return 0;
+}
+
+/* Gate: execute, or not, all of the non-trivial optimizations.  */
+
+static bool
+gate_all_early_local_passes (void)
+{
+         /* Don't bother doing anything if the program has errors.  */
+  return (!seen_error () && !in_lto_p);
+}
+
+struct simple_ipa_opt_pass pass_early_local_passes =
+{
+ {
+  SIMPLE_IPA_PASS,
+  "early_local_cleanups",              /* name */
+  gate_all_early_local_passes,         /* gate */
+  execute_all_early_local_passes,      /* execute */
+  NULL,                                        /* sub */
+  NULL,                                        /* next */
+  0,                                   /* static_pass_number */
+  TV_EARLY_LOCAL,                      /* tv_id */
+  0,                                   /* properties_required */
+  0,                                   /* properties_provided */
+  0,                                   /* properties_destroyed */
+  0,                                   /* todo_flags_start */
+  TODO_remove_functions                        /* todo_flags_finish */
+ }
+};
+
+/* Gate: execute, or not, all of the non-trivial optimizations.  */
+
+static bool
+gate_all_early_optimizations (void)
+{
+  return (optimize >= 1
+         /* Don't bother doing anything if the program has errors.  */
+         && !seen_error ());
+}
+
+struct gimple_opt_pass pass_all_early_optimizations =
+{
+ {
+  GIMPLE_PASS,
+  "early_optimizations",               /* name */
+  gate_all_early_optimizations,                /* gate */
+  NULL,                                        /* execute */
+  NULL,                                        /* sub */
+  NULL,                                        /* next */
+  0,                                   /* static_pass_number */
+  TV_NONE,                             /* tv_id */
+  0,                                   /* properties_required */
+  0,                                   /* properties_provided */
+  0,                                   /* properties_destroyed */
+  0,                                   /* todo_flags_start */
+  0                                    /* todo_flags_finish */
+ }
+};
+
+/* Gate: execute, or not, all of the non-trivial optimizations.  */
+
+static bool
+gate_all_optimizations (void)
+{
+  return (optimize >= 1
+         /* Don't bother doing anything if the program has errors.
+            We have to pass down the queue if we already went into SSA */
+         && (!seen_error () || gimple_in_ssa_p (cfun)));
+}
+
+struct gimple_opt_pass pass_all_optimizations =
+{
+ {
+  GIMPLE_PASS,
+  "*all_optimizations",                        /* name */
+  gate_all_optimizations,              /* gate */
+  NULL,                                        /* execute */
+  NULL,                                        /* sub */
+  NULL,                                        /* next */
+  0,                                   /* static_pass_number */
+  TV_OPTIMIZE,                         /* tv_id */
+  0,                                   /* properties_required */
+  0,                                   /* properties_provided */
+  0,                                   /* properties_destroyed */
+  0,                                   /* todo_flags_start */
+  0                                    /* todo_flags_finish */
+ }
+};
+
 static bool
 gate_rest_of_compilation (void)
 {
index 3dd6a7d019d8c7b1d0fa5f7c2878c43fd73c14d5..ba3adb0e059a23e8603d2581823d1c0e67e9ca8c 100644 (file)
@@ -853,7 +853,6 @@ rtx addr_for_mem_ref (struct mem_address *, addr_space_t, bool);
 void get_address_description (tree, struct mem_address *);
 tree maybe_fold_tmr (tree);
 
-unsigned int execute_free_datastructures (void);
 unsigned int execute_fixup_cfg (void);
 bool fixup_noreturn_call (gimple stmt);
 
index 7cd3ef35c971fb2233ce016f59e51086df23a910..d69a504d7de60c9d550e0b2d9e3ebaa865f71024 100644 (file)
@@ -46,107 +46,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "except.h"
 #include "plugin.h"
 
-/* Gate: execute, or not, all of the non-trivial optimizations.  */
-
-static bool
-gate_all_optimizations (void)
-{
-  return (optimize >= 1
-         /* Don't bother doing anything if the program has errors.
-            We have to pass down the queue if we already went into SSA */
-         && (!seen_error () || gimple_in_ssa_p (cfun)));
-}
-
-struct gimple_opt_pass pass_all_optimizations =
-{
- {
-  GIMPLE_PASS,
-  "*all_optimizations",                        /* name */
-  gate_all_optimizations,              /* gate */
-  NULL,                                        /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_OPTIMIZE,                         /* tv_id */
-  0,                                   /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
-};
-
-/* Gate: execute, or not, all of the non-trivial optimizations.  */
-
-static bool
-gate_all_early_local_passes (void)
-{
-         /* Don't bother doing anything if the program has errors.  */
-  return (!seen_error () && !in_lto_p);
-}
-
-static unsigned int
-execute_all_early_local_passes (void)
-{
-  /* Once this pass (and its sub-passes) are complete, all functions
-     will be in SSA form.  Technically this state change is happening
-     a tad early, since the sub-passes have not yet run, but since
-     none of the sub-passes are IPA passes and do not create new
-     functions, this is ok.  We're setting this value for the benefit
-     of IPA passes that follow.  */
-  if (cgraph_state < CGRAPH_STATE_IPA_SSA)
-    cgraph_state = CGRAPH_STATE_IPA_SSA;
-  return 0;
-}
-
-struct simple_ipa_opt_pass pass_early_local_passes =
-{
- {
-  SIMPLE_IPA_PASS,
-  "early_local_cleanups",              /* name */
-  gate_all_early_local_passes,         /* gate */
-  execute_all_early_local_passes,      /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_EARLY_LOCAL,                      /* tv_id */
-  0,                                   /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  TODO_remove_functions                        /* todo_flags_finish */
- }
-};
-
-/* Gate: execute, or not, all of the non-trivial optimizations.  */
-
-static bool
-gate_all_early_optimizations (void)
-{
-  return (optimize >= 1
-         /* Don't bother doing anything if the program has errors.  */
-         && !seen_error ());
-}
-
-struct gimple_opt_pass pass_all_early_optimizations =
-{
- {
-  GIMPLE_PASS,
-  "early_optimizations",               /* name */
-  gate_all_early_optimizations,                /* gate */
-  NULL,                                        /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_NONE,                             /* tv_id */
-  0,                                   /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
-};
-
 
 /* Pass: cleanup the CFG just before expanding trees to RTL.
    This is just a round of label cleanups and case node grouping
@@ -213,21 +112,6 @@ struct gimple_opt_pass pass_cleanup_cfg_post_optimizing =
  }
 };
 
-/* Pass: do the actions required to finish with tree-ssa optimization
-   passes.  */
-
-unsigned int
-execute_free_datastructures (void)
-{
-  free_dominance_info (CDI_DOMINATORS);
-  free_dominance_info (CDI_POST_DOMINATORS);
-
-  /* And get rid of annotations we no longer need.  */
-  delete_tree_cfg_annotations ();
-
-  return 0;
-}
-
 /* IPA passes, compilation of earlier functions or inlining
    might have changed some properties, such as marked functions nothrow,
    pure, const or noreturn.
@@ -335,33 +219,3 @@ struct gimple_opt_pass pass_fixup_cfg =
   0                                    /* todo_flags_finish */
  }
 };
-
-/* Do the actions required to initialize internal data structures used
-   in tree-ssa optimization passes.  */
-
-static unsigned int
-execute_init_datastructures (void)
-{
-  /* Allocate hash tables, arrays and other structures.  */
-  init_tree_ssa (cfun);
-  return 0;
-}
-
-struct gimple_opt_pass pass_init_datastructures =
-{
- {
-  GIMPLE_PASS,
-  "*init_datastructures",              /* name */
-  NULL,                                        /* gate */
-  execute_init_datastructures,         /* execute */
-  NULL,                                        /* sub */
-  NULL,                                        /* next */
-  0,                                   /* static_pass_number */
-  TV_NONE,                             /* tv_id */
-  PROP_cfg,                            /* properties_required */
-  0,                                   /* properties_provided */
-  0,                                   /* properties_destroyed */
-  0,                                   /* todo_flags_start */
-  0                                    /* todo_flags_finish */
- }
-};
index 08f908f6a6c4704c611d70d609f5dbfaa68d3db5..f399833c5460799508d9893cda013f0a910d2ed3 100644 (file)
@@ -1120,6 +1120,35 @@ init_tree_ssa (struct function *fn)
   init_phinodes ();
 }
 
+/* Do the actions required to initialize internal data structures used
+   in tree-ssa optimization passes.  */
+
+static unsigned int
+execute_init_datastructures (void)
+{
+  /* Allocate hash tables, arrays and other structures.  */
+  init_tree_ssa (cfun);
+  return 0;
+}
+
+struct gimple_opt_pass pass_init_datastructures =
+{
+ {
+  GIMPLE_PASS,
+  "*init_datastructures",              /* name */
+  NULL,                                        /* gate */
+  execute_init_datastructures,         /* execute */
+  NULL,                                        /* sub */
+  NULL,                                        /* next */
+  0,                                   /* static_pass_number */
+  TV_NONE,                             /* tv_id */
+  PROP_cfg,                            /* properties_required */
+  0,                                   /* properties_provided */
+  0,                                   /* properties_destroyed */
+  0,                                   /* todo_flags_start */
+  0                                    /* todo_flags_finish */
+ }
+};
 
 /* Deallocate memory associated with SSA data structures for FNDECL.  */