summaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2005-06-28 04:20:29 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2005-06-28 02:20:29 +0000
commitd63db217aed8c803f7d8b85910d6c8cfedc2acca (patch)
tree02b6b104f2f54b8af2a5bad55640e994b28ecfb5 /gcc/tree-inline.c
parent2aba33dd6f2d9cf16b2c2e25e73071b5e6d4368c (diff)
downloadgcc-d63db217aed8c803f7d8b85910d6c8cfedc2acca.tar.gz
cgraph.c (cgraph_remove_node): Do not release function bodies until full cgraph is built.
* cgraph.c (cgraph_remove_node): Do not release function bodies until full cgraph is built. * cgraph.h (cgraph_decide_inlining_incrementally): Add early argument. * cgraphunit.c (cgraph_finalize_function): Update call of cgraph_decide_inlining_incrementally. (initialize_inline_failed): Break out of ... (cgraph_analyze_function): ... here. (rebuild_cgraph_edges): New function. (pass_rebuild_cgraph_edges): New pass. * common.opt (fearly-inlining): New flag. * ipa-inline.c: Include ggc.h (cgraph_clone_inlined_nodes): Avoid re-using of original copy when cgraph is not fully built. (cgraph_decide_inlining_incrementally): Add early mode. (cgraph_early_inlining): New function. (cgraph_gate_early_inlining): Likewise. (pass_early_ipa_inline): New pass. * ipa.c (cgraph_postorder): NULLify aux pointer. * tree-inline.c (expand_call_inline): Avoid warning early. * tree-optimize.c (pass_early_local_passes): New. (execute_cleanup_cfg_pre_ipa): New. (pass_cleanup_cfg): New. (register_dump_files): Fix handling subpasses of IPA pass. (init_tree_optimization_passes): Add early passes. (execute_ipa_pass_list): Fix handling of subpasses of IPA pass. * passes.h (pass_early_tree_profile, pass_rebuild_cgraph_edges, pass_early_ipa_inline): New passes. * tree-profile.c (do_early_tree_profiling, pass_early_tree_profile): New. * invoke.texi: Document early-inlining. From-SVN: r101369
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index b625af3f90b..665707056f6 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -1969,7 +1969,9 @@ expand_call_inline (basic_block bb, tree stmt, tree *tp, void *data)
else if (warn_inline && DECL_DECLARED_INLINE_P (fn)
&& !DECL_IN_SYSTEM_HEADER (fn)
&& strlen (reason)
- && !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn)))
+ && !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn))
+ /* Avoid warnings during early inline pass. */
+ && (!flag_unit_at_a_time || cgraph_global_info_ready))
{
warning (0, "%Jinlining failed in call to %qF: %s", fn, fn, reason);
warning (0, "called from here");