aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-10-22 13:31:48 +0000
committerJan Hubicka <jh@suse.cz>2009-10-22 13:31:48 +0000
commitbb2e71e3fdd8a89ea8f2b20f5391247742ea943c (patch)
tree6cd22e449598bc92ae7760c5173f67597c593213
parent68bae95169938ea4a3a18c410fb7afb25c00a905 (diff)
* ipa-cp.c (ipcp_read_summary): Remove now invalid FIXME and
flag_ltrans check. * ipa-inline.c (cgraph_mark_inline_edge, cgraph_decide_inlining_of_small_function, cgraph_decide_inlining, inline_read_summary): Disable indirect inlining for WPA for time being. PR tree-optimize/40556 * ipa-inline.c (cgraph_early_inlining): Fix iterations condition. Fix PR number for earlier patch to: PR lto/41730 git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@153456 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/ipa-cp.c8
-rw-r--r--gcc/ipa-inline.c24
3 files changed, 26 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5d91f8713b6..d93585473e1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2009-10-22 Jan Hubicka <jh@suse.cz>
+
+ * ipa-cp.c (ipcp_read_summary): Remove now invalid FIXME and
+ flag_ltrans check.
+ * ipa-inline.c (cgraph_mark_inline_edge,
+ cgraph_decide_inlining_of_small_function,
+ cgraph_decide_inlining, inline_read_summary): Disable indirect inlining
+ for WPA for time being.
+
+ PR tree-optimize/40556
+ * ipa-inline.c (cgraph_early_inlining): Fix iterations condition.
+
2009-10-22 Richard Guenther <rguenther@suse.de>
* lto-streamer.h (lto_symtab_clear_resolution): Remove.
@@ -5,7 +17,7 @@
2009-10-22 Jan Hubicka <jh@suse.cz>
- PR tree-optimize/40556
+ PR lto/41730
* ipa-reference.c (has_proper_scope_for_analysis): Add fixme about
global vars.
(check_call): Handle only indirect calls.
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 4166e78d61c..79ff16e0e7f 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -1302,13 +1302,7 @@ ipcp_read_summary (void)
static bool
cgraph_gate_cp (void)
{
- /* FIXME lto. IPA-CP does not tolerate running when the inlining decisions
- have not been applied. This happens when WPA modifies the callgraph.
- Since those decisions are not applied until after all the IPA passes
- have been run in LTRANS, this means that IPA passes may see partially
- modified callgraphs. The solution to this is to apply WPA decisions
- early during LTRANS. */
- return flag_ipa_cp && !flag_ltrans;
+ return flag_ipa_cp;
}
struct ipa_opt_pass_d pass_ipa_cp =
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 9e1bc9f4883..81c3379ca2e 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -310,7 +310,7 @@ cgraph_mark_inline_edge (struct cgraph_edge *e, bool update_original,
overall_size -= orig_size;
ncalls_inlined++;
- if (flag_indirect_inlining)
+ if (flag_indirect_inlining && !flag_wpa)
return ipa_propagate_indirect_call_infos (curr, new_edges);
else
return false;
@@ -876,7 +876,7 @@ cgraph_decide_inlining_of_small_functions (void)
int min_size, max_size;
VEC (cgraph_edge_p, heap) *new_indirect_edges = NULL;
- if (flag_indirect_inlining)
+ if (flag_indirect_inlining && !flag_wpa)
new_indirect_edges = VEC_alloc (cgraph_edge_p, heap, 8);
if (dump_file)
@@ -1023,10 +1023,10 @@ cgraph_decide_inlining_of_small_functions (void)
if (where->global.inlined_to)
where = where->global.inlined_to;
if (!cgraph_decide_recursive_inlining (where,
- flag_indirect_inlining
+ flag_indirect_inlining && !flag_wpa
? &new_indirect_edges : NULL))
continue;
- if (flag_indirect_inlining)
+ if (flag_indirect_inlining && !flag_wpa)
add_new_edges_to_heap (heap, new_indirect_edges);
update_callee_keys (heap, where, updated_nodes);
}
@@ -1045,7 +1045,7 @@ cgraph_decide_inlining_of_small_functions (void)
}
callee = edge->callee;
cgraph_mark_inline_edge (edge, true, &new_indirect_edges);
- if (flag_indirect_inlining)
+ if (flag_indirect_inlining && !flag_wpa)
add_new_edges_to_heap (heap, new_indirect_edges);
update_callee_keys (heap, callee, updated_nodes);
@@ -1114,7 +1114,7 @@ cgraph_decide_inlining (void)
int initial_size = 0;
cgraph_remove_function_insertion_hook (function_insertion_hook_holder);
- if (in_lto_p && flag_indirect_inlining)
+ if (in_lto_p && flag_indirect_inlining && !flag_wpa)
ipa_update_after_lto_read ();
max_count = 0;
@@ -1268,7 +1268,7 @@ cgraph_decide_inlining (void)
}
/* Free ipa-prop structures if they are no longer needed. */
- if (flag_indirect_inlining)
+ if (flag_indirect_inlining && !flag_wpa)
free_all_ipa_structures_after_iinln ();
if (dump_file)
@@ -1589,10 +1589,10 @@ cgraph_early_inlining (void)
if (sorrycount || errorcount)
return 0;
- while (cgraph_decide_inlining_incrementally (node,
- iterations
- ? INLINE_SIZE_NORECURSIVE : INLINE_SIZE, 0)
- && iterations < PARAM_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS))
+ while (iterations < PARAM_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS)
+ && cgraph_decide_inlining_incrementally (node,
+ iterations
+ ? INLINE_SIZE_NORECURSIVE : INLINE_SIZE, 0))
{
timevar_push (TV_INTEGRATION);
todo |= optimize_inline_calls (current_function_decl);
@@ -1975,7 +1975,7 @@ inline_transform (struct cgraph_node *node)
static void
inline_read_summary (void)
{
- if (flag_indirect_inlining)
+ if (flag_indirect_inlining && !flag_wpa)
{
ipa_register_cgraph_hooks ();
if (!flag_ipa_cp)