[PATCH] D25848: [PM/OptBisect] Don't crash with some particular values of -opt-bisect-limit=

Andy Kaylor via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 12:18:02 PDT 2016


andrew.w.kaylor added inline comments.


================
Comment at: lib/Analysis/LoopPass.cpp:208
 
-      if (LoopWasDeleted) {
+      if (LoopWasDeleted || P->skipLoop(CurrentLoop)) {
         // Notify passes that the loop is being deleted.
----------------
This function shouldn't be called here.  The pass has already run (or not) by this point, and this call will cause the OptBisect component to increment its counter again and skipLoop() may return true here after having returned false when the current LoopPass was run.


https://reviews.llvm.org/D25848





More information about the llvm-commits mailing list