Hi, This patch implements the use phase of indirect-call-topn-profile that promotes multiple targets of indirect-calls. It addresses pr/45631.
The main idea is to use current speculation framework, with a vector of direct edges (sorted by the probability). The trick part is the we have multiple edges associating withe same call_stmt. Resolve_speculation and edirect_call_stmt_to_callee are more complex now. This patch still has some issues. It runs into an assertion verify_cgraph_node assertion() when ruing 483.xalancbmk in spec2006. I think Honza should be able to quickly spot the issue and give valuable suggestions. Thanks, -Rong
indirect_call_topn_profile_use_patch
Description: Binary data