[Mlir-commits] [mlir] [mlir][SPIR-V] Clear value and block ID maps after each function (PR #237171)
Arseniy Obolenskiy
llvmlistbot at llvm.org
Fri Oct 30 03:47:36 PDT 2026
https://github.com/aobolensk created https://github.com/llvm/llvm-project/pull/237171
SSA values and blocks are function local, so old entries only grow the maps
>From 577ef4b27d8819de2bd98d5979925c97235a1ccd Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Fri, 30 Oct 2026 11:46:52 +0100
Subject: [PATCH] [mlir][SPIR-V] Clear value and block ID maps after each
function
SSA values and blocks are function local, so old entries only grow the maps
---
mlir/lib/Target/SPIRV/Serialization/SerializeOps.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mlir/lib/Target/SPIRV/Serialization/SerializeOps.cpp b/mlir/lib/Target/SPIRV/Serialization/SerializeOps.cpp
index 254470eb5934f3..a665e326156af7 100644
--- a/mlir/lib/Target/SPIRV/Serialization/SerializeOps.cpp
+++ b/mlir/lib/Target/SPIRV/Serialization/SerializeOps.cpp
@@ -432,6 +432,8 @@ LogicalResult Serializer::processFuncOp(spirv::FuncOp op) {
functions.append(functionBody.begin(), functionBody.end());
functionHeader.clear();
functionBody.clear();
+ valueIDMap.clear();
+ blockIDMap.clear();
return success();
}
More information about the Mlir-commits
mailing list