[DebugInfo] Normalize common kinds of DWARF sub-expressions.
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 5 Sep 2018 10:18:36 +0000 (10:18 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 5 Sep 2018 10:18:36 +0000 (10:18 +0000)
commit965b598b2a9cf9a77fd9a4586484554eaed38ede
treeb0beecaa2e2692b1dcadc86e878475fd2e2f19c5
parente157cea3eca853a4b7e9b22e1119883ad1836f41
[DebugInfo] Normalize common kinds of DWARF sub-expressions.

Normalize common kinds of DWARF sub-expressions to make debug info
encoding a bit more compact:

  DW_OP_constu [X < 32] -> DW_OP_litX
  DW_OP_constu [all ones] -> DW_OP_lit0, DW_OP_not (64-bit only)

Differential revision: https://reviews.llvm.org/D51640

llvm-svn: 341457
14 files changed:
llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
llvm/test/DebugInfo/AMDGPU/variable-locations.ll
llvm/test/DebugInfo/ARM/PR26163.ll
llvm/test/DebugInfo/ARM/split-complex.ll
llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll
llvm/test/DebugInfo/X86/PR26148.ll
llvm/test/DebugInfo/X86/constant-loclist.ll
llvm/test/DebugInfo/X86/dw_op_minus_direct.ll
llvm/test/DebugInfo/X86/partial-constant.ll
llvm/test/DebugInfo/X86/pieces-4.ll
llvm/test/DebugInfo/X86/split-global.ll
llvm/test/DebugInfo/X86/stack-value-dwarf4.ll
llvm/test/DebugInfo/X86/stack-value-piece.ll