[Bug ipa/97403] Ancestor jump function should be generalized

jamborm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 10 08:13:34 GMT 2021


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

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #2)
> Martin,
> I think we can close this (possibly adding the testcase)

Depends.  ANCESTOR got generalized a bit but the propagation at IPA-CP level
still does not take place.  That is not a problem with jump functions though,
for that we need:

1) When propagating, look into "aggregate" constants when encountering a pass
through function and and there is something useful there (there is in this
case).  But we also need to somehow represent a reference to a simple constant
(which is not a CONST_DECL) in the lattices.

2) In the tree-replacement/transformation phase, find a mechanism to replace
applicable dereferences of the parameter with the constant.

Ultimately, a future return function should also get you a constant
(post-ipa-cp). 

We can file another bug with the same testcase though.


More information about the Gcc-bugs mailing list