[Mlir-commits] [mlir] [MLIR][LLVM] Fix recursive DI type export memory leak (PR #88122)
Billy Zhu
llvmlistbot at llvm.org
Tue Apr 9 06:27:16 PDT 2024
https://github.com/zyx-billy updated https://github.com/llvm/llvm-project/pull/88122
>From cf496c2531917f933c0ca94feffc27c3d9fc222a Mon Sep 17 00:00:00 2001
From: Billy Zhu <billyzhu at modular.com>
Date: Tue, 9 Apr 2024 15:20:51 +0200
Subject: [PATCH] must not cache temporaries
---
mlir/lib/Target/LLVMIR/DebugTranslation.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mlir/lib/Target/LLVMIR/DebugTranslation.cpp b/mlir/lib/Target/LLVMIR/DebugTranslation.cpp
index f6e05e25ace6ae..ead1566a13f761 100644
--- a/mlir/lib/Target/LLVMIR/DebugTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/DebugTranslation.cpp
@@ -349,7 +349,8 @@ llvm::DINode *DebugTranslation::translate(DINodeAttr attr) {
DISubroutineTypeAttr>(
[&](auto attr) { return translateImpl(attr); });
- attrToNode.insert({attr, node});
+ if (!node->isTemporary())
+ attrToNode.insert({attr, node});
return node;
}
More information about the Mlir-commits
mailing list