[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 08:26:11 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),
----------------
Orlando wrote:
> 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.
I totally misunderstood what `__asan_poison_memory_region(Ptr, Size);` was doing here, ignore my comment above. Sorry for the noise!
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