aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2011-06-23 18:45:08 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2011-06-23 16:45:08 +0000
commitfebb13025bec2b2a50c21e23e5b955cc31027c9d (patch)
treebc119ccc3a2b2d6675fc6bbabd3fb8cff5b454d4 /gcc/ipa-inline.c
parent4c77620d6dedebfb9f5092de3da0c9870587a734 (diff)
downloadgcc-febb13025bec2b2a50c21e23e5b955cc31027c9d.zip
gcc-febb13025bec2b2a50c21e23e5b955cc31027c9d.tar.gz
gcc-febb13025bec2b2a50c21e23e5b955cc31027c9d.tar.bz2
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
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c12
1 files changed, 5 insertions, 7 deletions
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 =