[PATCH] D91017: [BranchProbabilityInfo] Use SmallVector (NFC)

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 15 22:12:14 PST 2020


kazu added inline comments.


================
Comment at: llvm/lib/Analysis/BranchProbabilityInfo.cpp:1121
+  const SmallVector<BranchProbability, 2> &SrcProbs = SrcProbsIt->second;
+  assert(SrcProbs.size() == Src->getTerminator()->getNumSuccessors() &&
+         "The number of edge probabilities must match the number of "
----------------
yrouban wrote:
> could you please extract this assertion and the one at line 1099 to a separate patch that the rest NFC should depend on? This new extracted patch would be a functional change that impose a stronger restriction on BPI correctness.
I'll do that.  Again, let me do additional testing on my side and fix whatever issues come up before I'll post the assertion-only patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91017/new/

https://reviews.llvm.org/D91017



More information about the llvm-commits mailing list