[PATCH] D99423: [DebugInfo] Fix incorrect updating of SDNode dependencies for variadic debug values
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 9 07:38:06 PDT 2021
Orlando added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h:163
+ [&Alloc, Size = this->NumAdditionalDependencies](
+ auto Ptr) { Alloc.Deallocate(Ptr, Size); }),
+ Var(Var), Expr(Expr), DL(DL), Order(O), IsIndirect(IsIndirect),
----------------
I don't think you should call `Deallocate` when using a BumpPtrAllocator?
include/llvm/Support/Allocator.h
```
210 // Bump pointer allocators are expected to never free their storage; and
211 // clients expect pointers to remain valid for non-dereferencing uses even
212 // after deallocation.
213 void Deallocate(const void *Ptr, size_t Size, size_t /*Alignment*/) {
214 __asan_poison_memory_region(Ptr, Size);
215 }
```
IIUC the memory will be freed by the BumpPtrAllocator with everything else all at once.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99423/new/
https://reviews.llvm.org/D99423
More information about the llvm-commits
mailing list