public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Question about speculative make_edge_direct_to_target during LTO/IPA_PASS
@ 2022-07-01  9:46 Erick Ochoa
  2022-07-01 12:48 ` Martin Jambor
  0 siblings, 1 reply; 5+ messages in thread
From: Erick Ochoa @ 2022-07-01  9:46 UTC (permalink / raw)
  To: gcc

Hi,

I have a pass that is able to speculate the target of indirect function
calls. This pass is an IPA_PASS. It:

1. generates summaries with the possible targets.
2. writes analysis summary
3. reads analysis summary
4. combines the results from multiple partitions and if needed fixes the
targets
5. writes opt summary
6. reads opt summary
7. calls ipa_make_edge_direct_to_target with speculative=true

This pass is successful in that I can observe the transformation in the
generated gimple. (A function test and a direct function call in one branch
and the indirect function call in the other.)  However, I would like to
make the edges in the call graph visible to other IPA passes, particularly
ipa-cp. For this, I would need to create virtual clones during the WPA
stage. I am a little unfamiliar with virtual clones. What kind of
information would I need to store in the analysis summary and is there a
way to create speculative virtual clones? Can someone point to a similar
piece of code in GCC where this happens?

Thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-14 12:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-01  9:46 Question about speculative make_edge_direct_to_target during LTO/IPA_PASS Erick Ochoa
2022-07-01 12:48 ` Martin Jambor
2022-07-07 13:20   ` Erick Ochoa
2022-07-08 15:31     ` Martin Jambor
2022-07-14 12:40       ` Erick Ochoa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).