[PATCH] D11442: Provide an interface normalizeSuccWeights in MachineBasicBlock to normalize its successors' weights and use it in other places.
David Li via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 12:27:37 PDT 2015
davidxl added inline comments.
================
Comment at: test/Transforms/SampleProfile/branch.ll:41
@@ -41,2 +40,3 @@
+; CHECK: edge entry -> if.end probability is 1 / 2 = 50%
if.end: ; preds = %entry
----------------
Since BFI always ignores zero weight which leads to inconsistency (as BPI did not ignore zero weight before this fix, only BFI does it).
If the test case really intend to test a highly biased branch here, I think the test case should be modified to not use zero weight after this fix (as it now will be completely ignored). Changing the the results to 50% may violate what is intended by the test.
http://reviews.llvm.org/D11442
More information about the llvm-commits
mailing list