[PATCH] D118774: [DebugInfo][InstrRef][NFC] Use unique_ptr instead of raw pointers for value tables

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 2 03:52:08 PST 2022


jmorse created this revision.
jmorse added reviewers: StephenTozer, Orlando.
Herald added a subscriber: hiraditya.
jmorse requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

InstrRefBasedLDV allocates some big tables of `ValueIDNum`, to store live-in and live-out block values in, that then get passed around as pointers everywhere. This patch wraps the allocation in a std::unique_ptr, names some types based on unique_ptr, and passes references to those around instead. There's no functional change, but it makes it clearer to the reader that references to these tables are borrowed rather than owned, and we get some extra validity assertions too.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118774

Files:
  llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
  llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118774.405201.patch
Type: text/x-patch
Size: 14868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220202/c5ec8d65/attachment.bin>


More information about the llvm-commits mailing list