During post RA scheduling, do not try to chase reg defs. to preserve DBG_VALUEs....
authorDevang Patel <dpatel@apple.com>
Thu, 2 Jun 2011 20:07:12 +0000 (20:07 +0000)
committerDevang Patel <dpatel@apple.com>
Thu, 2 Jun 2011 20:07:12 +0000 (20:07 +0000)
commitcf4cc84738abc5f63a05b0956e756c66c519ded5
tree5d6bcfeb35690882b05903706bb720df40d6189b
parent580cbd9cf0b8f6f10bcb6b21a20dfd7d82680d3f
During post RA scheduling, do not try to chase reg defs. to preserve DBG_VALUEs. This approach has several downsides, for example, it does not work when dbg value is a constant integer, it does not work if reg is defined more than once, it places end of debug value range markers in the wrong place. It even causes misleading incorrect debug info when duplicate DBG_VALUE instructions point to same reg def.

Instead, use simpler approach and let DBG_VALUE follow its predecessor instruction. After live debug value analysis pass, all DBG_VALUE instruction are placed at the right place. Thanks Jakob for the hint!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132483 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ScheduleDAGInstrs.cpp
lib/CodeGen/ScheduleDAGInstrs.h
test/CodeGen/ARM/debug-info-branch-folding.ll