[PATCH] D34312: [NewPM/Inliner] Reduce threshold for cold callsites in the non-PGO case

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 14:28:21 PDT 2017


chandlerc added a comment.

In https://reviews.llvm.org/D34312#792293, @eraman wrote:

> I used BranchProbability as you suggested but due to BranchProbability's implementation I need to adjust the test case (essentitally BranchProbability(1,100) is < 1/100). This is not a big deal, but it does not treat a callsite guarded by a builtin_expect inside a loop as cold anymore.


I'd be happy to increase this to 2/100 to start with if that makes more sense to you. I agree that a callsite guarded by builtin_expect inside a loop seems like a good baseline for "is this threshold sane". (Naturally, we can tweak it further based on experience using it in the wild, but good to get a sane initial starting point.)


https://reviews.llvm.org/D34312





More information about the llvm-commits mailing list