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

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 15 22:08:52 PST 2020


yrouban 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 "
----------------
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.


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