[llvm-branch-commits] [llvm] 68de75e - [Mips] Use llvm::is_contained (NFC)

Kazu Hirata via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Dec 6 10:17:45 PST 2020


Author: Kazu Hirata
Date: 2020-12-06T10:12:55-08:00
New Revision: 68de75ec55eb62675f33cd5aaea93a973ebec1a2

URL: https://github.com/llvm/llvm-project/commit/68de75ec55eb62675f33cd5aaea93a973ebec1a2
DIFF: https://github.com/llvm/llvm-project/commit/68de75ec55eb62675f33cd5aaea93a973ebec1a2.diff

LOG: [Mips] Use llvm::is_contained (NFC)

Added: 
    

Modified: 
    llvm/lib/Target/Mips/MipsConstantIslandPass.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp b/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp
index faf7160e63e2..582f551ca32f 100644
--- a/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp
+++ b/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp
@@ -593,12 +593,7 @@ static bool BBHasFallthrough(MachineBasicBlock *MBB) {
     return false;
 
   MachineBasicBlock *NextBB = &*std::next(MBBI);
-  for (MachineBasicBlock::succ_iterator I = MBB->succ_begin(),
-       E = MBB->succ_end(); I != E; ++I)
-    if (*I == NextBB)
-      return true;
-
-  return false;
+  return llvm::is_contained(MBB->successors(), NextBB);
 }
 
 /// findConstPoolEntry - Given the constpool index and CONSTPOOL_ENTRY MI,


        


More information about the llvm-branch-commits mailing list