[llvm-commits] [llvm] r79312 - /llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp

Chris Lattner sabre at nondot.org
Mon Aug 17 21:33:15 PDT 2009


Author: lattner
Date: Mon Aug 17 23:33:15 2009
New Revision: 79312

URL: http://llvm.org/viewvc/llvm-project?rev=79312&view=rev
Log:
fix accidentally inverted conditional and add comment.

Modified:
    llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp

Modified: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=79312&r1=79311&r2=79312&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp Mon Aug 17 23:33:15 2009
@@ -128,6 +128,9 @@
   return I;
 }
 
+/// isOnlyReachableViaFallthough - Return true if this basic block has
+/// exactly one predecessor and the control transfer mechanism between
+/// the predecessor and this block is a fall-through.
 bool MachineBasicBlock::isOnlyReachableByFallthrough() const {
   // If this is a landing pad, it isn't a fall through.  If it has no preds,
   // then nothing falls through to it.
@@ -152,7 +155,7 @@
   
   // Otherwise, check the last instruction.
   const MachineInstr &LastInst = Pred->back();
-  return LastInst.getDesc().isBarrier();
+  return !LastInst.getDesc().isBarrier();
 }
 
 void MachineBasicBlock::dump() const {





More information about the llvm-commits mailing list