[llvm-branch-commits] [llvm] e6fde1a - [MemorySSA] Use is_contained (NFC)

Kazu Hirata via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Dec 22 20:03:45 PST 2020


Author: Kazu Hirata
Date: 2020-12-22T19:58:54-08:00
New Revision: e6fde1ae7df0b019392352b61d898c9b83b775fa

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

LOG: [MemorySSA] Use is_contained (NFC)

Added: 
    

Modified: 
    llvm/lib/Analysis/MemorySSA.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp
index 00b4d42892c9..c9ad9ffab16e 100644
--- a/llvm/lib/Analysis/MemorySSA.cpp
+++ b/llvm/lib/Analysis/MemorySSA.cpp
@@ -2017,8 +2017,7 @@ void MemorySSA::verifyOrderingDominationAndDefUses(Function &F) const {
              "Incomplete MemoryPhi Node");
       for (unsigned I = 0, E = Phi->getNumIncomingValues(); I != E; ++I) {
         verifyUseInDefs(Phi->getIncomingValue(I), Phi);
-        assert(find(predecessors(&B), Phi->getIncomingBlock(I)) !=
-                   pred_end(&B) &&
+        assert(is_contained(predecessors(&B), Phi->getIncomingBlock(I)) &&
                "Incoming phi block not a block predecessor");
       }
 #endif


        


More information about the llvm-branch-commits mailing list