Page MenuHomePhabricator

[WIP][DebugInfo] Allow MachineCopyPropagate to update DebugInfo RegUses

Authored by jmorse on Nov 19 2018, 11:30 AM.



This is a work-in-progress related to PR38754 [0], uploaded for visibility rather than review.

The purpose of the patch is to kill one use of changeDebugValuesDefReg and thus avoid using the related MachineInstr::collectDebugValues method. It constitutes an alternate fix for PR38773: rather than manually updating the registers that DBG_VALUEs refer to after MCP fires, instead mark DBG_VALUE register uses as being renamable. My understanding is that there's no functional (i.e. real instructions) reason why DBG_VALUEs can't be renamable, and it'll reduce the probability that less-well-written passes will behave differently when DBG_VALUEs are present. DBG_VALUE reg uses of the MCP'd register are then updated just like any other insn.

Either way seems fine to me; as mentioned though I'll upload a patch in a moment that messes with collectDebugValues, hence this option may be preferable.


Diff Detail