+2005-06-17 Jan Hubicka <jh@suse.cz>
+
+ * tree-optimize.c (execute_ipa_pass_list): New.
+ (ipa_passes): Use it.
+
2005-06-16 Richard Henderson <rth@redhat.com>
PR tree-opt/22022
#include "cfgloop.h"
#include "except.h"
-
/* Global variables used to communicate with passes. */
int dump_flags;
bool in_gimple_form;
do
{
if (execute_one_pass (pass) && pass->sub)
- execute_pass_list (pass->sub);
+ execute_pass_list (pass->sub);
+ pass = pass->next;
+ }
+ while (pass);
+}
+
+/* Same as execute_pass_list but assume that subpasses of IPA passes
+ are local passes. */
+static void
+execute_ipa_pass_list (struct tree_opt_pass *pass)
+{
+ do
+ {
+ if (execute_one_pass (pass) && pass->sub)
+ {
+ struct cgraph_node *node;
+ for (node = cgraph_nodes; node; node = node->next)
+ if (node->analyzed)
+ {
+ push_cfun (DECL_STRUCT_FUNCTION (node->decl));
+ current_function_decl = node->decl;
+ execute_pass_list (pass);
+ free_dominance_info (CDI_DOMINATORS);
+ free_dominance_info (CDI_POST_DOMINATORS);
+ current_function_decl = NULL;
+ pop_cfun ();
+ ggc_collect ();
+ }
+ }
pass = pass->next;
}
while (pass);
void
ipa_passes (void)
{
+ cfun = NULL;
+ tree_register_cfg_hooks ();
bitmap_obstack_initialize (NULL);
- execute_pass_list (all_ipa_passes);
+ execute_ipa_pass_list (all_ipa_passes);
bitmap_obstack_release (NULL);
}
\f