[PATCH] D48470: [LegacyPM] Fix PR37888 by teaching the legacy loop pass manager how to clear out deleted loops from the current queue beyond just the current loop.

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 19:10:57 PDT 2018


sanjoy accepted this revision.
sanjoy added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Analysis/LoopPass.cpp:149
+  assert(LQ.back() == CurrentLoop && "Loop queue back isn't the current loop!");
+  LQ.erase(std::remove(LQ.begin(), LQ.end(), &L), LQ.end());
+
----------------
Can we have the same loop multiple times in the loop queue?  If not would be nice to assert that and use the single iterator version of erase.


Repository:
  rL LLVM

https://reviews.llvm.org/D48470





More information about the llvm-commits mailing list