From febb13025bec2b2a50c21e23e5b955cc31027c9d Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 23 Jun 2011 18:45:08 +0200 Subject: re PR middle-end/49373 (Many testcase failures) PR tree-optimize/49373 * tree-pass.h (all_late_ipa_passes): Declare. * cgraphunit.c (init_lowered_empty_function): Fix properties. (cgraph_optimize): Execute late passes; remove unreachable funcions after materialization. * ipa-inline.c (gate_ipa_inline): Enable only when optimizing or LTOing. * passes.c (all_late_ipa_passes): Declare. (dump_passes, register_pass): Handle late ipa passes. (init_optimization_passes): Move ipa_pta to late passes; schedule fixup_cfg at beggining of all_passes. (apply_ipa_transforms): New function. (execute_one_pass): When doing simple ipa pass, apply all transforms. From-SVN: r175336 --- gcc/ipa-inline.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'gcc/ipa-inline.c') diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 90053e4..2f57e2d 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1972,17 +1972,15 @@ struct gimple_opt_pass pass_early_inline = /* When to run IPA inlining. Inlining of always-inline functions - happens during early inlining. */ + happens during early inlining. + + Enable inlining unconditoinally at -flto. We need size estimates to + drive partitioning. */ static bool gate_ipa_inline (void) { - /* ??? We'd like to skip this if not optimizing or not inlining as - all always-inline functions have been processed by early - inlining already. But this at least breaks EH with C++ as - we need to unconditionally run fixup_cfg even at -O0. - So leave it on unconditionally for now. */ - return 1; + return optimize || flag_lto || flag_wpa; } struct ipa_opt_pass_d pass_ipa_inline = -- cgit v1.1