Commit 79748d71 by Jan Hubicka Committed by Jan Hubicka

tree-optimize.c (execute_ipa_pass_list): New.

	* tree-optimize.c (execute_ipa_pass_list): New.
	(ipa_passes): Use it.

From-SVN: r101126
parent bb2b2a24
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> 2005-06-16 Richard Henderson <rth@redhat.com>
PR tree-opt/22022 PR tree-opt/22022
......
...@@ -50,7 +50,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -50,7 +50,6 @@ Boston, MA 02111-1307, USA. */
#include "cfgloop.h" #include "cfgloop.h"
#include "except.h" #include "except.h"
/* Global variables used to communicate with passes. */ /* Global variables used to communicate with passes. */
int dump_flags; int dump_flags;
bool in_gimple_form; bool in_gimple_form;
...@@ -671,6 +670,34 @@ execute_pass_list (struct tree_opt_pass *pass) ...@@ -671,6 +670,34 @@ execute_pass_list (struct tree_opt_pass *pass)
while (pass); 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 void
tree_lowering_passes (tree fn) tree_lowering_passes (tree fn)
{ {
...@@ -692,8 +719,10 @@ tree_lowering_passes (tree fn) ...@@ -692,8 +719,10 @@ tree_lowering_passes (tree fn)
void void
ipa_passes (void) ipa_passes (void)
{ {
cfun = NULL;
tree_register_cfg_hooks ();
bitmap_obstack_initialize (NULL); bitmap_obstack_initialize (NULL);
execute_pass_list (all_ipa_passes); execute_ipa_pass_list (all_ipa_passes);
bitmap_obstack_release (NULL); bitmap_obstack_release (NULL);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment