On Sun, Oct 27 2019, Jan Hubicka wrote: > Hi, > this patch makes ipa-prop to free edge summaries (jump functions) for > calls which has been inlined because they are no longer useful. > The main change is to change IPA_EDGE_REF from get_create to get > and thus we need to watch for missing summaires at some places so > combining -O0 and -O2 code works.
So, I never quite liked the IPA_NODE_REF and IPA_EDGE_REF macros. Perhaps now would be a good time to replace them everywhere with the get (and get_create) methods of the summary holders? Since ipa_node_params_sum->get might be a bit too long, perhaps we could use ipcp_node_sum->get or something similar. And similarly for edges. What do you think? Martin > > Bootstrapped/regtested x86_64-linux, comitted. > > * ipa-cp.c (propagate_constants_across_call): If args are not available > just drop everything to varying. > (find_aggregate_values_for_callers_subset): Watch for missing > edge summary. > (find_more_scalar_values_for_callers_subs): Likewise. > * ipa-prop.c (ipa_compute_jump_functions_for_edge, > update_jump_functions_after_inlining, propagate_controlled_uses): > Watch for missing summaries. > (ipa_propagate_indirect_call_infos): Remove summary after propagation > is finished. > (ipa_write_node_info): Watch for missing summaries. > (ipa_read_edge_info): Create new ref. > (ipa_edge_args_sum_t): Add remove. > (IPA_EDGE_REF_GET_CREATE): New macro. > * ipa-fnsummary.c (evaluate_properties_for_edge): Watch for missing > edge summary. > (remap_edge_change_prob): Likewise.