diff options
author | James Y Knight <jyknight@google.com> | 2020-05-15 23:43:30 -0400 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2020-07-01 12:51:50 -0400 |
commit | 4b0aa5724feaa89a9538dcab97e018110b0e4bc3 (patch) | |
tree | f6523c3c1909c3189112569059189e639d9ea720 /llvm/lib/CodeGen/MachineVerifier.cpp | |
parent | 78c69a00a4cff786e0ef13c895d0db309d6b3f42 (diff) | |
download | llvm-4b0aa5724feaa89a9538dcab97e018110b0e4bc3.zip llvm-4b0aa5724feaa89a9538dcab97e018110b0e4bc3.tar.gz llvm-4b0aa5724feaa89a9538dcab97e018110b0e4bc3.tar.bz2 |
Change the INLINEASM_BR MachineInstr to be a non-terminating instruction.
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 mayHaveInlineAsmBr, as appropriate.
Reviewed By: nickdesaulniers, void
Differential Revision: https://reviews.llvm.org/D79794
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineVerifier.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index d19e295..cfc6e38 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -584,7 +584,6 @@ MachineVerifier::visitMachineBasicBlockBefore(const MachineBasicBlock *MBB) { // it is an entry block or landing pad. for (const auto &LI : MBB->liveins()) { if (isAllocatable(LI.PhysReg) && !MBB->isEHPad() && - !MBB->isInlineAsmBrDefaultTarget() && MBB->getIterator() != MBB->getParent()->begin()) { report("MBB has allocatable live-in, but isn't entry or landing-pad.", MBB); report_context(LI.PhysReg); @@ -730,7 +729,7 @@ MachineVerifier::visitMachineBasicBlockBefore(const MachineBasicBlock *MBB) { continue; // Also accept successors which are for exception-handling or might be // inlineasm_br targets. - if (SuccMBB->isEHPad() || MBB->isInlineAsmBrIndirectTarget(SuccMBB)) + if (SuccMBB->isEHPad() || SuccMBB->isInlineAsmBrIndirectTarget()) continue; report("MBB has unexpected successors which are not branch targets, " "fallthrough, EHPads, or inlineasm_br targets.", |