public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Question on cgraph_edge::call_stmt during LTO
@ 2022-05-20 12:43 Erick Ochoa
  2022-05-20 22:13 ` Martin Jambor
  0 siblings, 1 reply; 4+ messages in thread
From: Erick Ochoa @ 2022-05-20 12:43 UTC (permalink / raw)
  To: gcc

Hi,

I'm working on a pass that looks into the estimated values during ipa-cp
and stores them for a later analyses/pass. I would like to store the real
arguments' estimates in a cgraph_edge::call_stmt or somewhere else that
makes similar sense. (Note, this is different from the formal parameters'
estimates which can be found in the lattice print out of ipa-cp).

I have already added a new field in the definition of gimple_call, made
sure that this field is streamed-out, streamed-in, and set the values
during ipa-cp. However, I am having problems with what I believe is the
inlining and cloning of cgraph_nodes. Whenever a cgraph_node is inlined or
cloned, I would need to copy this information and update if necessary. At
the moment, when I am trying to read the information during a late
SIMPLE_IPA_PASS, the information is simply not there. I believe that the
cgraph_edge is not the same since during ipa-cp the callee has been
specialized and during ipa-inline the caller has been inlined to a
different caller.

Also, for some cgraph_edge's the call_stmt is NULL. I believe this can also
be due to inlining, but I am not sure.

Can someone point out a good way to keep this information in sync with the
creation and deletion of cgraph_edges? Maybe an alternative to
cgraph_edge::call_stmt?

Thanks!

-Erick

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

end of thread, other threads:[~2022-06-14 16:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 12:43 Question on cgraph_edge::call_stmt during LTO Erick Ochoa
2022-05-20 22:13 ` Martin Jambor
2022-06-02  7:45   ` Erick Ochoa
2022-06-14 16:41     ` Martin Jambor

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).