[llvm] [IR2Vec] Refactor vocabulary to use section-based storage (PR #158376)
Kirill Stoimenov via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 2 17:29:42 PDT 2025
================
@@ -43,8 +43,11 @@ class FunctionPropertiesAnalysisTest : public testing::Test {
public:
FunctionPropertiesAnalysisTest() {
auto VocabVector = ir2vec::Vocabulary::createDummyVocabForTest(1);
- MAM.registerPass([&] { return IR2VecVocabAnalysis(VocabVector); });
- IR2VecVocab = ir2vec::Vocabulary(std::move(VocabVector));
+ MAM.registerPass([VocabVector = std::move(VocabVector)]() mutable {
+ return IR2VecVocabAnalysis(std::move(VocabVector));
+ });
+ IR2VecVocab =
----------------
kstoimenov wrote:
@svkeerthy this introduced a memory leak: https://lab.llvm.org/buildbot/#/builders/52/builds/11612
Could you please fix it? Thanks!
https://github.com/llvm/llvm-project/pull/158376
More information about the llvm-commits
mailing list