mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-08 18:30:26 +00:00
Reapply 68073, with fixes. EH Landing-pad basic blocks are not
entered via fall-through. Don't miss fallthroughs from blocks terminated by conditional branches. Also, move isOnlyReachableByFallthrough out of line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68129 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -123,6 +123,16 @@ MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() {
|
||||
return I;
|
||||
}
|
||||
|
||||
bool
|
||||
MachineBasicBlock::isOnlyReachableByFallthrough() const {
|
||||
return !isLandingPad() &&
|
||||
!pred_empty() &&
|
||||
next(pred_begin()) == pred_end() &&
|
||||
(*pred_begin())->isLayoutSuccessor(this) &&
|
||||
((*pred_begin())->empty() ||
|
||||
!(*pred_begin())->back().getDesc().isBarrier());
|
||||
}
|
||||
|
||||
void MachineBasicBlock::dump() const {
|
||||
print(*cerr.stream());
|
||||
}
|
||||
|
Reference in New Issue
Block a user