git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271097
91177308-0d34-0410-b5e6-
96231b3b80d8
}
M.setProfileSummary(Builder.getSummary()->getMD(M.getContext()));
// Set function hotness attribute from the profile.
+ // We have to apply these attributes at the end because their presence
+ // can affect the BranchProbabilityInfo of any callers, resulting in an
+ // inconsistent MST between prof-gen and prof-use.
for (auto &F : HotFunctions) {
F->addFnAttr(llvm::Attribute::InlineHint);
DEBUG(dbgs() << "Set inline attribute to function: " << F->getName()