+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.
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.
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 =
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;
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)
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);
}
}
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);
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;
}
/* 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)
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);
static void
inline_read_summary (void)
{
- if (flag_indirect_inlining)
+ if (flag_indirect_inlining && !flag_wpa)
{
ipa_register_cgraph_hooks ();
if (!flag_ipa_cp)