[llvm] [MIR] Fix vreg flag vector memory leak (PR #112479)
Akshat Oke via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 22:05:11 PDT 2024
https://github.com/optimisan updated https://github.com/llvm/llvm-project/pull/112479
>From c1690d0c48792980f36ff3d08383f86842ef2bd4 Mon Sep 17 00:00:00 2001
From: Akshat Oke <Akshat.Oke at amd.com>
Date: Tue, 15 Oct 2024 16:49:32 +0000
Subject: [PATCH] [MIR] Fix vreg flag vector memory leak
SmallVector allocates on stack so that works out here.
---
llvm/include/llvm/CodeGen/MIRParser/MIParser.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/include/llvm/CodeGen/MIRParser/MIParser.h b/llvm/include/llvm/CodeGen/MIRParser/MIParser.h
index 4d93213de5e070..ea4ba488c9295b 100644
--- a/llvm/include/llvm/CodeGen/MIRParser/MIParser.h
+++ b/llvm/include/llvm/CodeGen/MIRParser/MIParser.h
@@ -45,7 +45,7 @@ struct VRegInfo {
} D;
Register VReg;
Register PreferredReg;
- std::vector<uint8_t> Flags;
+ SmallVector<uint8_t> Flags;
};
using Name2RegClassMap = StringMap<const TargetRegisterClass *>;
More information about the llvm-commits
mailing list