[PATCH] D15548: Remove the restriction that known and unknown probabilities cannot coexist when being normalized.

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 13:54:19 PST 2015


davidxl added inline comments.

================
Comment at: include/llvm/Support/BranchProbability.h:195
@@ +194,3 @@
+
+  if (UnknownProbCount > 0 && Sum > 0) {
+    BranchProbability UnknownProb = BranchProbability::getZero();
----------------
why guarded with Sum > 0? 

================
Comment at: include/llvm/Support/BranchProbability.h:201
@@ +200,3 @@
+    if (Sum < BranchProbability::getDenominator())
+      UnknownProb = BranchProbability::getRaw(
+          (BranchProbability::getDenominator() - Sum) / UnknownProbCount);
----------------
may be name it 'ProbForUnknown'


http://reviews.llvm.org/D15548





More information about the llvm-commits mailing list