[PATCH] D85085: Fix debug_loc offset difference with basic block sections

Sriraman Tallam via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 21:36:36 PDT 2021


tmsriram updated this revision to Diff 336595.
tmsriram marked 4 inline comments as done.
tmsriram added a comment.

Address reviewer comments on adding various  test cases to make sure loc lists are generated the same way with and without basic block sections except when the ranges cross section boundaries.

Disabled the temporary fix applied in D87787 <https://reviews.llvm.org/D87787>.

I have mainly added two things in the patch:

- Explicitly check if the ranges can be merged into one with sections and this is similar to how MergeRanges works without sections.
- Split the ranges across sections when a range spans sections.  This happens specifically when an argument is used in a non-entry basic block, added a test for it.

Added individual tests for all the different cases pointed out by dblaikie@


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85085/new/

https://reviews.llvm.org/D85085

Files:
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/test/DebugInfo/X86/basic-block-sections-debug-loc-const-value-1.ll
  llvm/test/DebugInfo/X86/basic-block-sections-debug-loc-const-value-2.ll
  llvm/test/DebugInfo/X86/basic-block-sections-debug-loc-split-range.ll
  llvm/test/DebugInfo/X86/basic-block-sections-debug-loc.ll
  llvm/test/DebugInfo/X86/basic-block-sections-debug-loclist-1.ll
  llvm/test/DebugInfo/X86/basic-block-sections-debug-loclist-2.ll
  llvm/test/DebugInfo/X86/basic-block-sections-debug-loclist-3.ll
  llvm/test/DebugInfo/X86/basic-block-sections-debug-loclist-4.ll
  llvm/test/DebugInfo/X86/basic-block-sections-debug-loclist-5.ll
  llvm/test/DebugInfo/X86/basic-block-sections_1.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85085.336595.patch
Type: text/x-patch
Size: 45359 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210410/06c25718/attachment-0001.bin>


More information about the llvm-commits mailing list