[llvm-branch-commits] [llvm] 4707b21 - [AMDGPU] Use llvm::is_contained (NFC)

Kazu Hirata via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jan 15 21:06:14 PST 2021


Author: Kazu Hirata
Date: 2021-01-15T21:00:54-08:00
New Revision: 4707b21298a6daf28b08d9395568ccc94a549711

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

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

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp b/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp
index 85e402da342b..7635cd39cd2c 100644
--- a/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp
+++ b/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp
@@ -58,12 +58,7 @@ unsigned CFStack::getLoopDepth() {
 }
 
 bool CFStack::branchStackContains(CFStack::StackItem Item) {
-  for (std::vector<CFStack::StackItem>::const_iterator I = BranchStack.begin(),
-       E = BranchStack.end(); I != E; ++I) {
-    if (*I == Item)
-      return true;
-  }
-  return false;
+  return llvm::is_contained(BranchStack, Item);
 }
 
 bool CFStack::requiresWorkAroundForInst(unsigned Opcode) {


        


More information about the llvm-branch-commits mailing list