[PATCH] D130596: [StandardInstrumentations] Handle case where block order changes

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 5 12:02:45 PDT 2022


jamieschmeiser added a comment.

Sorry for the delay, missed this before going on vacation.



================
Comment at: llvm/lib/Passes/StandardInstrumentations.cpp:625
     HandlePair(&BData, &AData);
-    ++BI;
     ++AI;
----------------
I don't understand why you are removing this line.  On exiting the loop, (with your change to the loop) BI == BE or *BI == *AI.  In the latter case, we still want to advance BI or HandlePotentiallyRemovedData will be called with it on the next time through this loop (AI advances and the above loop will enter when BI != BE and HandlePotentiallyRemovedData will be called with BI before it is advanced).  Shouldn't this line be guarded with "if (BI != BE)" instead of being removed?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130596



More information about the llvm-commits mailing list