[PATCH] D30633: [BPI] Reduce the probability of unreachable edge to minimal value greater than 0
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 12:45:03 PDT 2017
davidxl added inline comments.
================
Comment at: lib/Analysis/BranchProbabilityInfo.cpp:291
auto ToDistribute = BranchProbability::getZero();
- auto UnreachableProb = getUnreachableProbability(UnreachableIdxs.size());
+ auto UnreachableProb = UR_TAKEN_PROB;
for (auto i : UnreachableIdxs)
----------------
Not sure if we want to add a case to cover the meta data is smaller and is kept.
The only possible way is to use 0 weight, which actually may end up creating a a larger BP (after BFI bumping it up). So we should probably add a comment here and unconditionally update the Unreachable branch (i.e. ignoring 0 weight metadata).
https://reviews.llvm.org/D30633
More information about the llvm-commits
mailing list