> The only question I have is flow_call_edges_add only called while > profiling or is it called some other time? So looking into who calls > flow_call_edges_add, it is only branch_prob (profile.cc) which is only > called from tree-profile.cc. So a cleanup (for GCC 16 is remove the > cfghook flow_call_edges_add and call gimple_flow_call_edges_add > directly from branch_prob).
This is remainder of times we were able to instrument both at RTL and Gimple level. Before cfgexpand we had no way to maintain gimple profile down to RTL land. So indeed we can drop the hook. Adding fake edges should be useful tool for passes with dataflow formulated in a way that it expects path form every statement to exit to exit. We do have some bugs in this direction and some other code ensuring this (like one in tree-ssa-dce). Honza > Plus blocks argument is always NULL so we could even remove support > for that too. > So this LGTM; though I can't approve it. > > Thanks, > Andrew Pinski > > > { > > edge e; > > > > -- > > 2.47.1 > >