Before this instruction supported output values, it fit fairly
naturally as a terminator. However, being a terminator while also
supporting outputs causes some trouble, as the physreg->vreg COPY
operations cannot be in the same block.
Modeling it as a non-terminator allows it to be handled the same way
as invoke is handled already.
Most of the changes here were created by auditing all the existing
users of MachineBasicBlock::isEHPad() and
MachineBasicBlock::hasEHPadSuccessor(), and adding calls to
isInlineAsmBrIndirectTarget or hasInlineAsmBr, as appropriate.
Sorry to bikeshed the name of this method, but I find it currently doesn't match the implementation well.
I'd take hasInlineAsmBr to mean "this MachineBasicBlock has an INLINEASM_BR MCInst." Instead, the implementation is checking whether any of the successors of this MachineBasicBlock is the indirect target of an INLINEASM_BR MCInst. Those two aren't the same thing. In fact, you could have a MachineBasicBlock where the current implementation of hasInlineAsmBR would return true, and yet the MachineBasicBlock does not actually contain a INLINEASM_BR MCInst.
I know that's what you're alluding to in the comment, but I think the method should be named hasInlineAsmBrSuccessors or something of the sort. Maybe MaybeHasInlineAsmBr since it sounds like you'd rather it not be precise by scanning all instructions for the relevant opcode? (Couldn't ISEL mark these when creating the MBB? I guess having a bool member is tricky, since transforms would have to update that correctly. In this case, rematerializing the value by rescanning is simpler, and harder to get wrong.)
I guess the name sounds precise, though the comment and implementation denote that it's not, and that's what I'm most hung up on.