MandarinAsmPrinter.cpp
/// isBlockOnlyReachableByFallthough - Return true if the basic block has
/// exactly one predecessor and the control transfer mechanism between
/// the predecessor and this block is a fall-through.
///
/// This overrides AsmPrinter's implementation to handle delay slots.
Return true if the basic block has
exactly one predecessor and the control transfer mechanism between
the predecessor and this block is a fall-through.

This overrides AsmPrinter's implementation to handle delay slots.
Return true if the basic block has exactly one predecessor and the control transfer mechanism between the predecessor and this block is a fall - through . This overrides AsmPrinter ' s implementation to handle delay slots .
bool MandarinAsmPrinter::
isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const {
  if (MBB->isLandingPad() || MBB->pred_empty())
    return false;
  MachineBasicBlock::const_pred_iterator PI = MBB->pred_begin(), PI2 = PI;
  ++PI2;
  if (PI2 != MBB->pred_end())
    return false;
  const MachineBasicBlock *Pred = *PI;
  if (!Pred->isLayoutSuccessor(MBB))
    return false;
  MachineBasicBlock::const_iterator I = Pred->end();
  while (I != Pred->begin() && !(--I)->isTerminator())
    ; 
  return I == Pred->end() || !I->isBarrier();
}
bool MandarinAsmPrinter :: isBlockOnlyReachableByFallthrough ( const MachineBasicBlock * MBB ) const { if ( MBB -> isLandingPad ( ) || MBB -> pred_empty ( ) ) return false ; MachineBasicBlock :: const_pred_iterator PI = MBB -> pred_begin ( ) , PI2 = PI ; ++ PI2 ; if ( PI2 != MBB -> pred_end ( ) ) return false ; const MachineBasicBlock * Pred = * PI ; if ( ! Pred -> isLayoutSuccessor ( MBB ) ) return false ; MachineBasicBlock :: const_iterator I = Pred -> end ( ) ; while ( I != Pred -> begin ( ) && ! ( -- I ) -> isTerminator ( ) ) ; return I == Pred -> end ( ) || ! I -> isBarrier ( ) ; }
isBlockOnlyReachableByFallthough - Return true if the basic block has
exactly one predecessor and the control transfer mechanism between
the predecessor and this block is a fall-through.
isBlockOnlyReachableByFallthough - Return true if the basic block has exactly one predecessor and the control transfer mechanism between the predecessor and this block is a fall - through .
// If this is a landing pad, it isn't a fall through.  If it has no preds, // then nothing falls through to it. // If there isn't exactly one predecessor, it can't be a fall through. // The predecessor has to be immediately before this block. // Check if the last terminator is an unconditional branch. // Noop