[PATCH] D43956: [DebugInfo] Discard invalid DBG_VALUE instructions in LiveDebugVariables
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 1 10:13:50 PST 2018
bjope created this revision.
Herald added subscribers: JDevlieghere, eraman.
This is a workaround for pr36417
LiveDebugVariables will now verify that the DBG_VALUE instructions
are sane (prior to register allocation) by asking LIS if a virtual
register used in the DBG_VALUE is live (or dead def) in the slot
index before the DBG_VALUE. If it isn't sane the DBG_VALUE is
One pass that was identified as introducing non-sane DBG_VALUE
instructtons, when analysing pr36417, was the DAG->DAG Instruction
Selection. It sometimes inserts DBG_VALUE instructions referring to
a virtual register that is defined later in the same basic block.
So it is a use before def kind of problem. The DBG_VALUE is
typically inserted in the beginning of a basic block when this
happens. The problem can be seen in the test case
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 9388 bytes
Desc: not available
More information about the llvm-commits