[PATCH] D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN)
Alok Kumar Sharma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 24 09:42:19 PST 2019
alok created this revision.
alok added reviewers: aprantl, probinson, dblaikie, jmorse, jini.susan.george, SouraVX, awpandey.
alok added projects: LLVM, debug-info.
Herald added a subscriber: llvm-commits.
This patch (1/N) stems from D69787 <https://reviews.llvm.org/D69787>
It is suggested by @aprantl
Summary:
It Introduces a new Dwarf operator DW_OP_LLVM_argN (N=0-7).
Which represents Nth argument of containing intrinsic.
Example:
For example in intrinsic
"call @llvm.dbg.someintrinsic(DILocalVariable("x"), DILocalVariable("y"),
metadata !DIExpression(DW_OP_LLVM_arg0, DW_OP_LLVM_arg1, DW_OP_plus))"
'DW_OP_LLVM_arg0' represents 'DILocalVariable("x")' and
'DW_OP_LLVM_arg1' represents 'DILocalVariable("y")'.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70642
Files:
llvm/docs/LangRef.rst
llvm/include/llvm/BinaryFormat/Dwarf.def
Index: llvm/include/llvm/BinaryFormat/Dwarf.def
===================================================================
--- llvm/include/llvm/BinaryFormat/Dwarf.def
+++ llvm/include/llvm/BinaryFormat/Dwarf.def
@@ -652,6 +652,15 @@
// Extensions for Fission proposal.
HANDLE_DW_OP(0xfb, GNU_addr_index, 0, GNU)
HANDLE_DW_OP(0xfc, GNU_const_index, 0, GNU)
+// The LLVM extension.
+HANDLE_DW_OP(0x4000, LLVM_arg0, 0, LLVM)
+HANDLE_DW_OP(0x4001, LLVM_arg1, 0, LLVM)
+HANDLE_DW_OP(0x4002, LLVM_arg2, 0, LLVM)
+HANDLE_DW_OP(0x4003, LLVM_arg3, 0, LLVM)
+HANDLE_DW_OP(0x4004, LLVM_arg4, 0, LLVM)
+HANDLE_DW_OP(0x4005, LLVM_arg5, 0, LLVM)
+HANDLE_DW_OP(0x4006, LLVM_arg6, 0, LLVM)
+HANDLE_DW_OP(0x4007, LLVM_arg7, 0, LLVM)
// DWARF languages.
HANDLE_DW_LANG(0x0001, C89, 0, 2, DWARF)
Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -4815,6 +4815,12 @@
signed offset of the specified register. The opcode is only generated by the
``AsmPrinter`` pass to describe call site parameter value which requires an
expression over two registers.
+- ``DW_OP_LLVM_argN`` represents argumnet number N of the containing LLVM
+ intrinsic. Where N can be any value from 0 to 7. For example in intrinsic
+ ``call @llvm.dbg.someintrinsic(DILocalVariable("x"), DILocalVariable("y"),
+ metadata !DIExpression(DW_OP_LLVM_arg0, DW_OP_LLVM_arg1, DW_OP_plus))``
+ ``DW_OP_LLVM_arg0`` represents ``DILocalVariable("x")`` and
+ ``DW_OP_LLVM_arg1`` represents ``DILocalVariable("y")``.
DWARF specifies three kinds of simple location descriptions: Register, memory,
and implicit location descriptions. Note that a location description is
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70642.230798.patch
Type: text/x-patch
Size: 1727 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191124/7ac8c68d/attachment.bin>
More information about the llvm-commits
mailing list