[PATCH] D15259: Normalize MBB's successors' probabilities in several locations.
David Li via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 8 17:15:14 PST 2015
davidxl added a comment.
Are there any test case changes?
================
Comment at: lib/CodeGen/IfConversion.cpp:1263
@@ -1262,2 +1262,3 @@
BBI.BB->addSuccessor(CvtBBI->FalseBB, NewFalse);
+ BBI.BB->normalizeSuccProbs();
}
----------------
Add a brief comment about why normalization is needed (i.e., why the input BPs do not sum up to 1)?
================
Comment at: lib/CodeGen/IfConversion.cpp:1719
@@ -1717,3 +1718,3 @@
// If the edge from ToBBI.BB to Succ already exists, update the
// probability of this edge by adding NewWeight to it. An example is shown
// below, in which A is ToBBI.BB and B is FromBBI.BB. In this case we
----------------
The comment needs to be fixed (probably in a different patch).
================
Comment at: lib/CodeGen/IfConversion.cpp:1753
@@ -1751,1 +1752,3 @@
+ ToBBI.BB->normalizeSuccProbs();
+ FromBBI.BB->normalizeSuccProbs();
----------------
It is unclear why this is needed.
================
Comment at: lib/CodeGen/IfConversion.cpp:1754
@@ +1753,3 @@
+ ToBBI.BB->normalizeSuccProbs();
+ FromBBI.BB->normalizeSuccProbs();
+
----------------
Will its successor edge be discarded later?
http://reviews.llvm.org/D15259
More information about the llvm-commits
mailing list