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