This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Make IPA-CP work when there are SCCs of call graph nodes represented by a thunk
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Tue, 10 Sep 2013 14:35:33 +0200
- Subject: Re: [PATCH] Make IPA-CP work when there are SCCs of call graph nodes represented by a thunk
- Authentication-results: sourceware.org; auth=none
- References: <20130910121210 dot GD6732 at virgil dot suse>
> Hi,
>
> until recently we did not have thunks with incoming edges in the call
> graph. However, speculative devirtualization can introduce them which
We did, just not very often. Normal devirtualization code can produce them,
too.
> may lead to creation of new SCCs in the call graph. What is more,
> ipa_reduced_postorder called with reduce parameter set to true may
> decide to represent the whole SCC with the thunk which will in turn
> currently cause propagate_constants_topo from IPA-CP to ignore the
> whole SCC and make ipcp_verify_propagated_values fail later. This
> happens for example when compiling Mozilla Firefox (I did it with LTO
> but it failed even when creating a fat unit object file). I believe
> Honza has this check disabled for this reason.
Yes, I have this check disabled and I am waiting for this patch to enable
ipa-devirt at LTO. Thanks for working on this!
>
> The patch below fixes propagate_constants_topo by making it check each
> node in the SCC rather than just the leading one. I have also changed
> it to use ipa_get_nodes_in_cycle rather than loop through dfs_infos
> since that seems to be the documented way of iterating over SCCs.
> (And I should probably move edge_within_scc to ipa-utils too.)
Interesting, I did not know about that - all the code seems to be doing
the former. I never liked the representation of dfs_infos, so it is
good we have abstraction.
>
> 2013-09-09 Martin Jambor <mjambor@suse.cz>
>
> * ipa-cp.c (propagate_constants_topo): Do not ignore SCC
> represented by a thunk.
Patch is OK. Thanks!
Honza