[PATCH] D69999: [DebugInfo] Support for DW_OP_implicit_pointer (IR Verifier and Bitcode)

Alok Kumar Sharma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 02:40:24 PST 2019


alok created this revision.
alok added reviewers: aprantl, probinson, dblaikie, jmorse, jini.susan.george, SouraVX.
alok added projects: LLVM, debug-info.
Herald added subscribers: llvm-commits, ormris, hiraditya.
alok added a parent revision: D69886: [DebugInfo] Support for DW_OP_implicit_pointer (CodeGen phase).

This patch (1/N) stems from D69787 <https://reviews.llvm.org/D69787> as suggested by @aprantl (Adrian Prantl)

Summary:
 This patch adds support in IR verifier and Bitcode for DW_OP_implicit_pointer

      

The test case having IR with DW_OP_implicit_pointer, will be compiled successfully (without generating DW_OP_implicit_pointer)
 Note: To generate DW_OP_implicit_pointer in dwarf info, rest part of D69787 <https://reviews.llvm.org/D69787> is needed.

  Class DwarfCompileUnit has been modified to add member ImplicitVars of vector type. Below is the usage of it.
  
  First operand of DW_OP_implicit_pointer operation is a reference to a debugging information entry that describes the dereferenced object’s value. when this operation is created, The debugging information entry is not yet formed. To solve this problem, we maintain a vector of dereferenced objects. We keep index of dereferenced object's at first operand of DW_OP_implicit_pointer operation temporarily. This temporary value is later replaced by actual value when available.

If a variable has only single DBG_VALUE then currently location list is not created instead value is used to initialized the var. In case of DW_OP_implicit_pointer, now location list will still be created.

Testing:

- Added unit test for validation thru llvm-dwarfdump
- check-llvm
- check-debuginfo (the debug info integration tests)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69999

Files:
  llvm/include/llvm/CodeGen/MachineInstr.h
  llvm/include/llvm/CodeGen/MachineInstrBuilder.h
  llvm/include/llvm/IR/DebugInfoMetadata.h
  llvm/include/llvm/IR/IntrinsicInst.h
  llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
  llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
  llvm/lib/CodeGen/LiveDebugValues.cpp
  llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
  llvm/lib/IR/DebugInfoMetadata.cpp
  llvm/lib/IR/IntrinsicInst.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/test/DebugInfo/implicit_pointer_verify.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69999.228391.patch
Type: text/x-patch
Size: 24126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191108/63d7d741/attachment.bin>


More information about the llvm-commits mailing list