diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index e848741..2d4b604 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -277,8 +277,16 @@ LLVM_DUMP_METHOD void MachineBasicBlock::dump() const { } #endif +bool MachineBasicBlock::mayHaveInlineAsmBr() const { + for (const MachineBasicBlock *Succ : successors()) { + if (Succ->isInlineAsmBrIndirectTarget()) + return true; + } + return false; +} + bool MachineBasicBlock::isLegalToHoistInto() const { - if (isReturnBlock() || hasEHPadSuccessor()) + if (isReturnBlock() || hasEHPadSuccessor() || mayHaveInlineAsmBr()) return false; return true; } @@ -1132,7 +1140,7 @@ bool MachineBasicBlock::canSplitCriticalEdge( // Splitting the critical edge to a callbr's indirect block isn't advised. // Don't do it in this generic function. - if (isInlineAsmBrIndirectTarget(Succ)) + if (Succ->isInlineAsmBrIndirectTarget()) return false; const MachineFunction *MF = getParent(); |