OSDN Git Service

PR32288: More efficient encoding for DWARF expr subregister access.
authorAdrian Prantl <aprantl@apple.com>
Thu, 16 Mar 2017 16:34:14 +0000 (16:34 +0000)
committerAdrian Prantl <aprantl@apple.com>
Thu, 16 Mar 2017 16:34:14 +0000 (16:34 +0000)
commit7c8e19d7a9a17a92ee8f99b55d92c570a3de8210
tree95638b0e7c0b9ecded5da78010f26315c20d5cc7
parenta2d20c4bcacdf51fb263a5b6fec11dea89b3f2ab
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.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297960 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfExpression.cpp
lib/CodeGen/AsmPrinter/DwarfExpression.h
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