The attached patch fixed the problem. The root cause of the problem is due to the ordering change of profile_estimation and tree_profile pass. In trunk, the function/node frequency is not computed after profile annotation is done leading to missing information. Another side effect of this breakage is optimize_function_for_size query is also broken leading to larger than necessary binary with FDO.
Bootstrapped on x86_64/linux. All FDO testing passed. Ok after regression test? David
p
Description: Binary data
