[PATCH] D155006: [YAML][NFC] Use BumpPtrAllocator instead of unique_ptrs
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 10:59:24 PDT 2023
dblaikie added a comment.
What are the codepaths that currently destroy these nodes? Is there any mutability in the data structure, or is it only "build build build, use, then destroy"? If it's the latter, then yeah, arena allocation seems fine.
> It's possible to match unique_ptr behavior and also free memory in setCurrentDocument.
Ah, so perhaps this answers my question - the deallocation is done at `TopNode = `? *nod* Wuold probably be good to match the behavior there, to avoid continuous growth.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155006/new/
https://reviews.llvm.org/D155006
More information about the llvm-commits
mailing list