D78586 implements good sanity checks in MachineVerifier that for each
LiveIn register to a MachineBasicBlock, that at least one predecessor
MachineBasicBlock defines the register as LiveOut.
The PhysReg MachineOperands for INLINEASM_BR MachineInstrs were being
implicit-def'd but marked dead (i.e. no uses in local MachineBasicBlock)
by live-vars.
ScheduleDAGSDNodes::EmitSchedule() splits the MachineBasicBlock
containing the INLINEASM_BR, post that MachineInstr, and marks the
LiveIns. But there's no marking of LiveOuts. If a use is visible within
the same MachineBasicBlock, live-vars will calculate the LiveOuts
correctly.
Since the uses aren't visible in the same MachineBasicBlock as the
INLINEASM_BR MachineInstr, teach LiveVariables::runOnBlock() to special
case INLINEASM_BR's PhysReg defs, so that they're not marked dead.
Implementing TCOPY (D75098) should also make the uses visible to
live-vars as well, at which point, this change to LiveVariables should
be reverted (but not the tests).
I'm concerned about the "allowing it to do a single local analysis to resolve physical register lifetimes in each basic block" part. Is this change enough to actually make the liveness reliable? In particular, I'm concerned what might happens if the fallthrough successor of an INLINEASM_BR has other predecessors. (Or is that impossible?)