]> granicus.if.org Git - llvm/commit
[DebugInfo] Introduce DW_OP_LLVM_convert
authorMarkus Lavin <markus.lavin@ericsson.com>
Tue, 19 Mar 2019 08:48:19 +0000 (08:48 +0000)
committerMarkus Lavin <markus.lavin@ericsson.com>
Tue, 19 Mar 2019 08:48:19 +0000 (08:48 +0000)
commit1cf4b593a7ebd666fc6775f3bd38196e8e65fafe
tree79f29f941e6e358d196e8f2c9ae514a49e32efe6
parent9ecd435b55a3e58e1e3f71d478ff02c57840a900
[DebugInfo] Introduce DW_OP_LLVM_convert

Introduce a DW_OP_LLVM_convert Dwarf expression pseudo op that allows
for a convenient way to perform type conversions on the Dwarf expression
stack. As an additional bonus it paves the way for using other Dwarf
v5 ops that need to reference a base_type.

The new DW_OP_LLVM_convert is used from lib/Transforms/Utils/Local.cpp
to perform sext/zext on debug values but mainly the patch is about
preparing terrain for adding other Dwarf v5 ops that need to reference a
base_type.

For Dwarf v5 the op maps to DW_OP_convert and for earlier versions a
complex shift & mask pattern is generated to emulate sext/zext.

Differential Revision: https://reviews.llvm.org/D56587

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356442 91177308-0d34-0410-b5e6-96231b3b80d8
37 files changed:
docs/LangRef.rst
include/llvm/BinaryFormat/Dwarf.h
include/llvm/CodeGen/AsmPrinter.h
include/llvm/CodeGen/DIE.h
include/llvm/CodeGen/DIEValue.def
include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
include/llvm/DebugInfo/DWARF/DWARFExpression.h
include/llvm/MC/MCStreamer.h
lib/AsmParser/LLParser.cpp
lib/BinaryFormat/Dwarf.cpp
lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
lib/CodeGen/AsmPrinter/ByteStreamer.h
lib/CodeGen/AsmPrinter/DIE.cpp
lib/CodeGen/AsmPrinter/DIEHash.cpp
lib/CodeGen/AsmPrinter/DebugLocEntry.h
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
lib/CodeGen/AsmPrinter/DwarfExpression.cpp
lib/CodeGen/AsmPrinter/DwarfExpression.h
lib/CodeGen/AsmPrinter/DwarfFile.h
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/CodeGen/AsmPrinter/LLVMBuild.txt
lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
lib/DebugInfo/DWARF/DWARFDie.cpp
lib/DebugInfo/DWARF/DWARFExpression.cpp
lib/IR/AsmWriter.cpp
lib/IR/DebugInfoMetadata.cpp
lib/MC/MCStreamer.cpp
lib/Transforms/Utils/Local.cpp
test/Assembler/diexpression.ll
test/DebugInfo/Generic/convert-debugloc.ll [new file with mode: 0644]
test/DebugInfo/Generic/convert-inlined.ll [new file with mode: 0644]
test/DebugInfo/Generic/convert-linked.ll [new file with mode: 0644]
test/Transforms/InstCombine/cast-set-preserve-signed-dbg-val.ll
unittests/Transforms/Utils/LocalTest.cpp