davidxl added a comment. This can be done in the PGO pass itself before the MST is formed. BFI has update interface such as setBlockFreq. The update can use simple heuristic to distribute the frequency. https://reviews.llvm.org/D40699