[llvm] [Codegen] (NFC) Faster algorithm for MachineBlockPlacement (PR #91843)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 18:10:06 PDT 2024


================
@@ -3158,9 +3158,9 @@ bool MachineBlockPlacement::maybeTailDuplicateBlock(
 
         // Handle the filter set
         if (BlockFilter) {
-          BlockFilter->remove(RemBB);
           if (*PrevUnplacedBlockInFilterIt == RemBB)
             PrevUnplacedBlockInFilterIt++;
+          BlockFilter->remove(RemBB);
----------------
weiguozhi wrote:

With this modification to BlockFilter, PrevUnplacedBlockInFilterIt becomes invalidated.

https://github.com/llvm/llvm-project/pull/91843


More information about the llvm-commits mailing list