This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [LTO][PATCH] Fix WPA breakage


Can you try this?

Index: ipa-prop.c
===================================================================
--- ipa-prop.c	(revision 140656)
+++ ipa-prop.c	(working copy)
@@ -985,6 +985,10 @@
 ipa_propagate_indirect_call_infos (struct cgraph_edge *cs,
 				   VEC (cgraph_edge_p, heap) **new_edges)
 {
+  /* FIXME lto: We do not stream out indirect call information.  */
+  if (flag_wpa)
+    return;
+
   propagate_info_to_inlined_callees (cs, cs->callee, new_edges);
 }



2008/9/25 Ollie Wild <aaw@google.com>:
> 2008/9/25 Doug Kwan (Ãö®¶¼w) <dougkwan@google.com>
>>
>> I know what causes the problem.  The inter-procedural constant
>> propagation pass generates summary information about indirect calls.
>> Currently we do not write out this summary.  It is regenerated in the
>> normal LTO run.  When we run WPA, regenerating that information is not
>> possible because the function bodies are not present in memory.  So we
>> do have that piece of information.  The crash you see is caused by the
>> IPA inliner when it tries to copy the indirect-call summary of edges
>> and nodes.
>
> What's the easiest way to disable this?  Simply commenting out the
> following block:
>
>      /* FIXME lto. Hack. We should use the IPA passes.  There are a number
>         of issues with this now. 1. There is no convenient way to do this.
>         2. Some passes may depend on properties that requires the function
>         bodies to compute.  */
>      cgraph_function_flags_ready = true;
>      bitmap_obstack_initialize (NULL);
>      ipa_register_cgraph_hooks ();
>
>      /* Reset inlining informationi before running IPA inliner.  */
>      for (node = cgraph_nodes; node; node = node->next)
>        reset_inline_failed (node);
>
>      /* FIXME lto. We should not call this function directly. */
>      pass_ipa_inline.pass.execute ();
>
>      verify_cgraph ();
>      bitmap_obstack_release (NULL);
>
> triggers another error:
>
>    lto1: internal compiler error: in
> cgraph_function_body_availability, at cgraph.c:1384
>
> I'd like to disable this for now, so we can start linking all the
> WHOPR bits together without things blowing up.
>
> Ollie
>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]