[PATCH] D76336: [DWARF] Emit DW_AT_call_pc for tail calls

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 17 18:23:40 PDT 2020


vsk created this revision.
vsk added reviewers: aprantl, dblaikie, JDevlieghere.
vsk added a project: debug-info.
Herald added a subscriber: hiraditya.
vsk added a child revision: D76337: [lldb/DWARF] Use DW_AT_call_pc to determine artificial frame address.

Record the address of a tail-calling branch instruction within its call
site entry using DW_AT_call_pc. This allows a debugger to determine the
address to use when creating aritificial frames.

This creates an extra attribute + relocation at tail call sites, which
constitute 3-5% of all call sites in xnu/clang respectively.

rdar://60307600


https://reviews.llvm.org/D76336

Files:
  llvm/include/llvm/DWARFLinker/DWARFLinker.h
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/lib/DWARFLinker/DWARFLinker.cpp
  llvm/test/DebugInfo/MIR/X86/call-site-gnu-vs-dwarf5-attrs.mir
  llvm/test/DebugInfo/X86/dwarf-callsite-related-attrs.ll
  llvm/test/tools/dsymutil/X86/Inputs/tail-call.cpp
  llvm/test/tools/dsymutil/X86/Inputs/tail-call.macho.x86_64
  llvm/test/tools/dsymutil/X86/Inputs/tail-call.macho.x86_64.o
  llvm/test/tools/dsymutil/X86/tail-call-linking.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76336.250954.patch
Type: text/x-patch
Size: 11859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200318/94ab3262/attachment.bin>


More information about the llvm-commits mailing list