Emit correct location lists with basic block sections.
authorSriraman Tallam <tmsriram@google.com>
Thu, 27 May 2021 00:12:31 +0000 (17:12 -0700)
committerSriraman Tallam <tmsriram@google.com>
Thu, 27 May 2021 00:12:31 +0000 (17:12 -0700)
commitcaae570978c490a137921b9516162a382831209e
tree807ce9c57ea16b3cce0182c823624ed364d127c7
parent74edfb28053dac26d82d1372123be03db630ef62
Emit correct location lists with basic block sections.

This patch addresses multiple things:

1) It ensures that const_value is emitted when possible with basic block
sections.
2) It emits location lists such that the labels are always within the
section boundary.
3) It fixes a bug when the parameter is first used in a non-entry block
which is in a different section from the entry block.

Differential Revision: https://reviews.llvm.org/D85085
13 files changed:
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/test/DebugInfo/X86/basic-block-sections-debug-loc-const-value-1.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/basic-block-sections-debug-loc-const-value-2.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/basic-block-sections-debug-loc-split-range.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/basic-block-sections-debug-loc.ll
llvm/test/DebugInfo/X86/basic-block-sections-debug-loclist-1.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/basic-block-sections-debug-loclist-2.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/basic-block-sections-debug-loclist-3.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/basic-block-sections-debug-loclist-4.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/basic-block-sections-debug-loclist-5.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/basic-block-sections_1.ll