OSDN Git Service

PR32288: More efficient encoding for DWARF expr subregister access.
authorAdrian Prantl <aprantl@apple.com>
Thu, 16 Mar 2017 17:14:56 +0000 (17:14 +0000)
committerAdrian Prantl <aprantl@apple.com>
Thu, 16 Mar 2017 17:14:56 +0000 (17:14 +0000)
commit308a80b637285a2a0a5fbd701234345c66ed241c
tree83863849232e8394b92f52aae4881050441b7e0c
parent7e21d8d3b19dcf51a3f2745213d3933b5227af67
PR32288: More efficient encoding for DWARF expr subregister access.

Citing http://bugs.llvm.org/show_bug.cgi?id=32288

  The DWARF generated by LLVM includes this location:

  0x55 0x93 0x04 DW_OP_reg5 DW_OP_piece(4) When GCC's DWARF is simply
  0x55 (DW_OP_reg5) without the DW_OP_piece. I believe it's reasonable
  to assume the DWARF consumer knows which part of a register
  logically holds the value (low bytes, high bytes, how many bytes,
  etc) for a primitive value like an integer.

This patch gets rid of the redundant DW_OP_piece when a subregister is
at offset 0. It also adds previously missing subregister masking when
a subregister is followed by another operation.

(This reapplies r297960 with two additional testcase updates).

rdar://problem/31069390
https://reviews.llvm.org/D31010

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297965 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
lib/CodeGen/AsmPrinter/DwarfExpression.cpp
lib/CodeGen/AsmPrinter/DwarfExpression.h
test/CodeGen/ARM/debug-info-s16-reg.ll
test/CodeGen/ARM/debug-info-sreg2.ll
test/DebugInfo/ARM/s-super-register.ll
test/DebugInfo/X86/PR26148.ll
test/DebugInfo/X86/dbg-value-const-byref.ll
test/DebugInfo/X86/dbg-value-regmask-clobber.ll
test/DebugInfo/X86/dw_op_minus_direct.ll
test/DebugInfo/X86/fission-ranges.ll
test/DebugInfo/X86/single-dbg_value.ll
test/DebugInfo/X86/subreg.ll
test/DebugInfo/X86/subregisters.ll