[Mlir-commits] [mlir] [mlir][spirv] Split conditional basic blocks during deserialization (PR #127639)

Jakub Kuderski llvmlistbot at llvm.org
Mon Feb 24 07:58:18 PST 2025


================
@@ -2158,13 +2158,69 @@ LogicalResult spirv::Deserializer::wireUpBlockArgument() {
   return success();
 }
 
+LogicalResult spirv::Deserializer::splitConditionalBlocks() {
+  // Create a copy, so we can modify keys in the original.
+  BlockMergeInfoMap blockMergeInfoCopy = blockMergeInfo;
+  for (auto it = blockMergeInfoCopy.begin(); it != blockMergeInfoCopy.end();
+       ++it) {
----------------
kuhar wrote:

Do not re-evaluate `.end()`: https://llvm.org/docs/CodingStandards.html#don-t-evaluate-end-every-time-through-a-loop

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


More information about the Mlir-commits mailing list