[PATCH] D32124: [BPI] Follow up rL300440. NFC

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 10:18:14 PDT 2017


vsk added a comment.

Thanks for the cleanup.

One note is that it would help to explicitly explain what your patch changes, and why, in your description (the title would be a very condensed version of this). This would make your patch easier to review.



================
Comment at: lib/Analysis/BranchProbabilityInfo.cpp:334
       // Tail goes to the first reachable edge.
-      BP[ReachableIdxs[0]] += ToDistribute;
+      BP[ReachableIdxs[0]] += ToDistribute - (PerEdge * ReachableIdxs.size());
     }
----------------
IIUC, the "tail" is supposed to be some small, non-negative epsilon value. Maybe it's worth asserting this? E.g assert(tail >= 0 && tail < 1).


https://reviews.llvm.org/D32124





More information about the llvm-commits mailing list