Hi,

My current understanding of LTO is that the callgraph is very dynamic
(i.e., optimizations might add or remove cgraph_nodes). A while back I
encountered an issue where I couldn't print the cgraph_node::name of a
function during the execute stage in LTO. I found that the only thing
different was that these cgraph_nodes had a prevailing_p () returning
false. There's only a few other places in the GCC sources that look at
prevailing_p (ipa-fnsummary.c and ipa-prop.c) and both of them seem to
drop information if the cgraph_node is not prevailing.

I took this as guidance and in my optimization I dropped information
from non-prevailing cgraph_nodes. (I figured out it must be something
similar to the remove cgraph_hooks.) However, I am now revisiting
whether this interpretation was correct or not. Can someone tell me
what does cgraph_node::prevailing_p actually means?

Also, is there a way to code an LTO test where a specific
cgraph_node's prevailing_p returns false? That way I could probably
verify the correctness of my analysis in the presence of
non-prevailing_p cgraph_nodes.

Thanks!

Reply via email to