HomePhabricator

[DebugInfo] Allow creation of DBG_VALUEs in blocks where the operand is not used

Description

[DebugInfo] Allow creation of DBG_VALUEs in blocks where the operand is not used

dbg.value intrinsics can appear in blocks where their operand is not used,
meaning the operand never receives an SDNode, and thus no DBG_VALUE will
be created. Get around this by looking to see whether the operand has already
been allocated a virtual register. This allows dbg.values of Phi node and
Values that are used across basic blocks to successfully be translated into
DBG_VALUEs.

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