summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-08 11:13:14 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-08 11:13:14 +0000
commitf37a500840527ce3a068813b04b57ccfca23a20f (patch)
tree5658297c549eec3a1a45febe1d3d11e413cc482c /gcc/ipa-inline.c
parent85eb3cd7157d1eeab1222c32130974cb3c3ab83f (diff)
downloadgcc-f37a500840527ce3a068813b04b57ccfca23a20f.tar.gz
* tree-pas.h (TODO_remove_function): New flag.
(TODO_update*): Renumber. (pass_ipa_increase_alignment, pass_ipa_function_and_variable_visibility): New passes. * cgraphunit.c (cgraph_increase_alignment): Move to tree-vectorizer.c (cgraph_function_and_variable_visibility): Move to ipa.c (cgraph_optimize): Don't call cgraph_function_and_variable_visibility, cgraph_increase_alignment. * ipa-inline.c (cgraph_decide_inlining): Don't push timevar. (cgraph_decide_inlining_incrementally): Push TV_INTEGRATION before calling tree-inline. (cgraph_early_inlining): Do not call cgraph_remove_unreachable_nodes. (pass_ipa_inline, pass_early_ipa_inlining): Set TODO_remove_functions * tree-vectorizer.c (increase_alignment): Move here from cgraphunit.c (gate_increase_alignment): New function. (pass_ipa_increase_alignment): New pass. * ipa.c: Inline tree-pass.h and timevar.h (function_and_variable_visibility): Move here from cgraphunit.c * tree-optimize.c (pass_early_local_passes): Add TODO_remove_functions. * passes.c (init_optimization_passes): Add the two new passes. (execute_todo): Handle cgraph_remove_functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120576 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index ec2438411c9..bf9790fd47d 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -925,7 +925,6 @@ cgraph_decide_inlining (void)
int old_insns = 0;
int i;
- timevar_push (TV_INLINE_HEURISTICS);
max_count = 0;
for (node = cgraph_nodes; node; node = node->next)
if (node->analyzed && (node->needed || node->reachable))
@@ -1083,7 +1082,6 @@ cgraph_decide_inlining (void)
ncalls_inlined, nfunctions_inlined, initial_insns,
overall_insns);
free (order);
- timevar_pop (TV_INLINE_HEURISTICS);
return 0;
}
@@ -1146,6 +1144,7 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node, bool early)
}
if (early && inlined)
{
+ timevar_push (TV_INTEGRATION);
push_cfun (DECL_STRUCT_FUNCTION (node->decl));
tree_register_cfg_hooks ();
current_function_decl = node->decl;
@@ -1153,6 +1152,7 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node, bool early)
node->local.self_insns = node->global.insns;
current_function_decl = NULL;
pop_cfun ();
+ timevar_pop (TV_INTEGRATION);
}
return inlined;
}
@@ -1172,12 +1172,13 @@ struct tree_opt_pass pass_ipa_inline =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- TV_INTEGRATION, /* tv_id */
+ TV_INLINE_HEURISTICS, /* tv_id */
0, /* properties_required */
PROP_cfg, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_dump_cgraph | TODO_dump_func, /* todo_flags_finish */
+ TODO_dump_cgraph | TODO_dump_func
+ | TODO_remove_functions, /* todo_flags_finish */
0 /* letter */
};
@@ -1223,7 +1224,6 @@ cgraph_early_inlining (void)
ggc_collect ();
}
}
- cgraph_remove_unreachable_nodes (true, dump_file);
#ifdef ENABLE_CHECKING
for (node = cgraph_nodes; node; node = node->next)
gcc_assert (!node->global.inlined_to);
@@ -1249,12 +1249,13 @@ struct tree_opt_pass pass_early_ipa_inline =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- TV_INTEGRATION, /* tv_id */
+ TV_INLINE_HEURISTICS, /* tv_id */
0, /* properties_required */
PROP_cfg, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_dump_cgraph | TODO_dump_func, /* todo_flags_finish */
+ TODO_dump_cgraph | TODO_dump_func
+ | TODO_remove_functions, /* todo_flags_finish */
0 /* letter */
};