https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119614

--- Comment #27 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Created attachment 61116
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61116&action=edit
WIP and only mildly tested patch

This is my current WIP patch, so far only mildly tested, but which
fixes the test from comment #22.

A logical continuation of this might be to ditch ipa_return_value_sum
and store the return value VR always to clone_info since even with
this patch it becomes a misnomer because it will contain optimization
information about nodes which are not a clone.  But since the
information needs to be available to the callers of the function they
describe too, I cannot think of a more appropriate place (apart from
creating another variant of clone_info which does not seem to be
justified either).

The fact that the VR would then go from clone_info to ipa_node_ref and
then back to clone_info would actually be reasonable, since another
logical extension is to have IPA-CP propagate VRs through return
pass-through jump functions.

In any event, comments welcome.

Reply via email to