diff options
author | Jan Hubicka <jh@suse.cz> | 2013-08-30 17:41:26 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-08-30 15:41:26 +0000 |
commit | 8a41354f5b0ce051d47ec8465048a1873a62e8e6 (patch) | |
tree | 3b9154fede0868d904d1f675f33c7c0dbcdfd5e6 /gcc/ipa-inline.c | |
parent | a624d5fe08ca0e8bf755a33b4849ff03d511958e (diff) | |
download | gcc-8a41354f5b0ce051d47ec8465048a1873a62e8e6.zip gcc-8a41354f5b0ce051d47ec8465048a1873a62e8e6.tar.gz gcc-8a41354f5b0ce051d47ec8465048a1873a62e8e6.tar.bz2 |
cgraph.c (cgraph_function_body_availability): Handle weakref correctly.
* cgraph.c (cgraph_function_body_availability): Handle weakref
correctly.
* passes.def: Remove pass_fixup_cfg.
* ipa-inline.c (ipa_inline): When not optimizing, do not inline;
track when we need to remove functions.
(gate_ipa_inline): Execute inlining always; add comment why.
(pass_data_ipa_inline): Remove TODO_remove_functions.
* ipa-inline-analysis.c (inline_generate_summary): When not optimizing
do not produce summaries.
* symtab.c (change_decl_assembler_name): Handle renaming of weakrefs.
(symtab_nonoverwritable_alias): Assert we are not called on weakref.
* varpool.c (cgraph_variable_initializer_availability): Fix weakrefs,
constant pool and vtable.
From-SVN: r202111
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 1152695..9a9408e 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1904,6 +1904,10 @@ ipa_inline (void) XCNEWVEC (struct cgraph_node *, cgraph_n_nodes); int i; int cold; + bool remove_functions = false; + + if (!optimize) + return 0; if (in_lto_p && optimize) ipa_update_after_lto_read (); @@ -1984,6 +1988,7 @@ ipa_inline (void) { cgraph_resolve_speculation (edge, NULL); update = true; + remove_functions = true; } } if (update) @@ -2018,6 +2023,7 @@ ipa_inline (void) } inline_call (node->callers, true, NULL, NULL, true); + remove_functions = true; if (dump_file) fprintf (dump_file, " Inlined into %s which now has %i size\n", @@ -2048,7 +2054,7 @@ ipa_inline (void) /* In WPA we use inline summaries for partitioning process. */ if (!flag_wpa) inline_free_summary (); - return 0; + return remove_functions ? TODO_remove_functions : 0; } /* Inline always-inline function calls in NODE. */ @@ -2292,13 +2298,13 @@ make_pass_early_inline (gcc::context *ctxt) /* When to run IPA inlining. Inlining of always-inline functions happens during early inlining. - Enable inlining unconditoinally at -flto. We need size estimates to - drive partitioning. */ + Enable inlining unconditoinally, because callgraph redirection + happens here. */ static bool gate_ipa_inline (void) { - return optimize || flag_lto || flag_wpa; + return true; } namespace { @@ -2315,7 +2321,7 @@ const pass_data pass_data_ipa_inline = 0, /* properties_provided */ 0, /* properties_destroyed */ TODO_remove_functions, /* todo_flags_start */ - ( TODO_dump_symtab | TODO_remove_functions ), /* todo_flags_finish */ + ( TODO_dump_symtab ), /* todo_flags_finish */ }; class pass_ipa_inline : public ipa_opt_pass_d |