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: [PATCH] Make IPA-CP work when there are SCCs of call graph nodes represented by a thunk


> 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


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