[PATCH] D14973: Replace all weight-based interfaces in MBB with probability-based interfaces, and update all uses of old interfaces.
David Li via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 14:42:42 PST 2015
davidxl added inline comments.
================
Comment at: include/llvm/Support/BranchProbability.h:57
@@ +56,3 @@
+ // Create a BranchProbability object from 64-bit integers.
+ static BranchProbability getBranchProbability64(uint64_t Numerator,
+ uint64_t Denominator);
----------------
It is better to remove 64 suffix in the name here.
================
Comment at: lib/CodeGen/IfConversion.cpp:1246
@@ -1268,2 +1245,3 @@
llvm_unreachable("Unable to reverse branch condition!");
TII->InsertBranch(*BBI.BB, CvtBBI->FalseBB, nullptr, RevCond, dl);
+
----------------
it is better to move this closer to addSuccessor call .
================
Comment at: lib/CodeGen/IfConversion.cpp:1249
@@ +1248,3 @@
+ // Update the edge probability for both CvtBBI->FalseBB and NextBBI.
+ // New_Prob(BBI.BB, NextBBI->BB) =
+ // Prob(BBI.BB, NextBBI->BB) +
----------------
// NewNext = New_Prob(....) =
================
Comment at: lib/CodeGen/IfConversion.cpp:1252
@@ +1251,3 @@
+ // Prob(BBI.BB, CvtBBI->BB) * Prob(CvtBBI->BB, NextBBI->BB)
+ // New_Prob(BBI.BB, CvtBBI->FalseBB) =
+ // Prob(BBI.BB, CvtBBI->BB) * Prob(CvtBBI->BB, CvtBBI->FalseBB)
----------------
// NewFalse = New_Prob(...) =
http://reviews.llvm.org/D14973
More information about the llvm-commits
mailing list