[PATCH] D15489: Use getEdgeProbability() instead of getEdgeWeight() in BFI and remove getEdgeWeight() interfaces from MBPI.
David Li via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 14 15:53:13 PST 2015
davidxl added inline comments.
================
Comment at: include/llvm/Analysis/BlockFrequencyInfoImpl.h:1178
@@ +1177,3 @@
+// A helper function that converts a branch probability into weight.
+inline uint32_t convertBranchProbabilityToWeight(const BranchProbability Prob) {
+ return Prob.getNumerator();
----------------
The name is too long. How about just getWeightFromBranchProb?
================
Comment at: test/Analysis/BlockFrequencyInfo/bad_input.ll:13
@@ -14,1 +12,3 @@
+; Check that we get 1 and a huge frequency instead of 0,3.
+; CHECK-NEXT: for.body: float = 2147483647.8,
for.body:
----------------
The original code also calls into Src->getSuccProbability(Dst).getNumerator() eventually -- so the change looks like NFC -- I missed something obvious here ..
http://reviews.llvm.org/D15489
More information about the llvm-commits
mailing list