]> granicus.if.org Git - llvm/commit
[DebugInfo] Insert DEBUG_VALUEs after each register redefinition
authorKarl-Johan Karlsson <karl-johan.karlsson@ericsson.com>
Thu, 5 Oct 2017 08:37:31 +0000 (08:37 +0000)
committerKarl-Johan Karlsson <karl-johan.karlsson@ericsson.com>
Thu, 5 Oct 2017 08:37:31 +0000 (08:37 +0000)
commitb71dbeaf08fad916a2ebd7594fab61aa6b2a32a7
treedc0272818e6c1d3e9bb4651e7e49d1502c54f177
parentfbdce7000bfca57ab473b6bd5c13d0f7db7a68f7
[DebugInfo] Insert DEBUG_VALUEs after each register redefinition

Summary:
When reinserting debug values after register allocation, make sure to
insert debug values after each redefinition of debug value register in
the slot index range. The reason for this is that DwarfDebug will end
the range of a debug variable when the physical reg is defined. For
instructions with e.g. tied operands this result in prematurely ended
debug range.

This resolves pr34545

Patch by Karl-Johan Karlsson and Bjorn Pettersson

Reviewers: rnk, aprantl

Reviewed By: rnk

Subscribers: bjope, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314974 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/LiveDebugVariables.cpp
test/DebugInfo/X86/pr34545.ll [new file with mode: 0644]