[PATCH] D129382: Add BAT testing framework

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 18:12:44 PDT 2022


rafauler added inline comments.


================
Comment at: bolt/lib/Passes/ValidateInternalCalls.cpp:96
   for (BinaryBasicBlock &BB : Function) {
     for (auto II = BB.begin(); II != BB.end(); ++II) {
       MCInst &Inst = *II;
----------------
maksfb wrote:
> Unrelated to this patch: we need to iterate over the copy of BBs as we increase the size inside the loop potentially invalidating the iterator.
When this function creates a new block and potentially invalidates iterators (for both BBs and mcinsts), it stops the loop (returns true). So there is no issue with invalidation here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129382



More information about the llvm-commits mailing list