]> granicus.if.org Git - llvm/commit
[DebugInfo] Incorrect debug info record generated for loop counter.
authorAlexey Lapshin <a.v.lapshin@mail.ru>
Thu, 6 Jun 2019 21:19:39 +0000 (21:19 +0000)
committerAlexey Lapshin <a.v.lapshin@mail.ru>
Thu, 6 Jun 2019 21:19:39 +0000 (21:19 +0000)
commit891c55ccc57a9dd7db74e105bf02e70b3151b9f6
tree3df5858ce1bac74ec2a290b911ed3351c14930e8
parent4dcfa85e5d034fa46953236ca7f7187ff4048042
[DebugInfo] Incorrect debug info record generated for loop counter.

Incorrect Debug Variable Range was calculated while "COMPUTING LIVE DEBUG VARIABLES" stage.
Range for Debug Variable("i") computed according to current state of instructions
inside of basic block. But Register Allocator creates new instructions which were not taken
into account when Live Debug Variables computed. In the result DBG_VALUE instruction for
the "i" variable was put after these newly inserted instructions. This is incorrect.
Debug Value for the loop counter should be inserted before any loop instruction.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362750 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/LiveDebugVariables.cpp
test/CodeGen/AArch64/wrong_debug_loc_after_regalloc.ll [new file with mode: 0644]
test/DebugInfo/X86/dbg-addr-dse.ll
test/DebugInfo/X86/live-debug-variables.ll