[PATCH] D86151: [DwarfDebug] Improve single location detection in validThroughout (2/4)

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 10:12:07 PDT 2020


Orlando created this revision.
Orlando added reviewers: vsk, djtodoro, dblaikie, aprantl.
Orlando added projects: LLVM, debug-info.
Herald added subscribers: llvm-commits, hiraditya.
Orlando requested review of this revision.

With this patch we're now accounting for two more cases which should be
considered 'valid throughout': First, where RangeEnd is ScopeEnd. Second, where
RangeEnd comes before ScopeEnd when including meta instructions, but are both
preceded by the same non-meta instruction.

CTMark shows a geomean binary size reduction of 1.5% for RelWithDebInfo builds.
`llvm-locstats` (using D85636 <https://reviews.llvm.org/D85636>) shows a very small variable location coverage
change in 2 of 10 binaries, but it is in the order of 10s of bytes which lines
up with my expectations.

I've added a test which checks both of these new cases. The first check in the
test isn't strictly necessary for this patch. But I'm not sure that it is
explicitly tested anywhere else, and is useful for the final patch in the
series.


https://reviews.llvm.org/D86151

Files:
  llvm/include/llvm/CodeGen/DbgEntityHistoryCalculator.h
  llvm/include/llvm/CodeGen/DebugHandlerBase.h
  llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
  llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/test/DebugInfo/X86/single-location-2.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86151.286319.patch
Type: text/x-patch
Size: 11430 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200818/3ca15f32/attachment.bin>


More information about the llvm-commits mailing list