[PATCH] D80611: [BrachProbablityInfo] Proportional distribution of reachable probabilities
Hiroshi Yamauchi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 27 11:56:28 PDT 2020
yamauchi added inline comments.
================
Comment at: llvm/lib/Analysis/BranchProbabilityInfo.cpp:105
/// (eventually) in unreachable. These are predicted as unlikely as possible.
/// All reachable probability will equally share the remaining part.
static const BranchProbability UR_TAKEN_PROB = BranchProbability::getRaw(1);
----------------
"equally" -> "proportionally"?
================
Comment at: llvm/lib/Analysis/BranchProbabilityInfo.cpp:372
+ // newBP[i] / oldBP[i] == newBP[j] / oldBP[j] == K
+ // Where K is independed on i,j.
+ // newBP[i] == oldBP[i] * K
----------------
'independed on' -> 'independent of'?
================
Comment at: llvm/lib/Analysis/BranchProbabilityInfo.cpp:385
+ BranchProbability NewUnreachableSum = BranchProbability::getZero();
+ for (auto i : UnreachableIdxs)
+ NewUnreachableSum += BP[i];
----------------
Capitalize 'i' -> 'I'.
This loop could be combined with the above loop, but would be less clear?
================
Comment at: llvm/lib/Analysis/BranchProbabilityInfo.cpp:392
+ BranchProbability OldReachableSum = BranchProbability::getZero();
+ for (auto i : ReachableIdxs)
+ OldReachableSum += BP[i];
----------------
Capitalize 'i' -> 'I'
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80611/new/
https://reviews.llvm.org/D80611
More information about the llvm-commits
mailing list