[PATCH] D27862: [BPI] Use saturating multiplication to calculate denominators

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 15:56:39 PST 2016


davidxl added inline comments.


================
Comment at: lib/Analysis/BranchProbabilityInfo.cpp:167
+  BranchProbability UnreachableProb(
+      UR_TAKEN_WEIGHT, SaturatingMultiply(UR_TAKEN_WEIGHT + UR_NONTAKEN_WEIGHT,
+                                          (uint32_t)UnreachableEdges.size()));
----------------
BranchProbablity::getBranchProbablity(..) method takes uint64 as the argument. You can probably use that


https://reviews.llvm.org/D27862





More information about the llvm-commits mailing list