summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2015-11-29 04:37:11 +0000
committerCraig Topper <craig.topper@gmail.com>2015-11-29 04:37:11 +0000
commitd0573179dc790b0a866c7e6dc1854590709ce709 (patch)
treec96b268fdd9148b9cd52cbfbcbac0ed8a652e2af /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentc945c8d22e69f79adca4d63087ab481562e38902 (diff)
downloadbcm5719-llvm-d0573179dc790b0a866c7e6dc1854590709ce709.tar.gz
bcm5719-llvm-d0573179dc790b0a866c7e6dc1854590709ce709.zip
[SelectionDAG] Use std::any_of instead of a manually coded loop. NFC
llvm-svn: 254242
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 72cc0c195eb..53d006c9d9f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -11317,15 +11317,11 @@ bool DAGCombiner::MergeConsecutiveStores(StoreSDNode* St) {
break;
}
- bool Alias = false;
// Check if this store interferes with any of the loads that we found.
- for (unsigned ld = 0, lde = AliasLoadNodes.size(); ld < lde; ++ld)
- if (isAlias(AliasLoadNodes[ld], StoreNodes[i].MemNode)) {
- Alias = true;
- break;
- }
- // We found a load that alias with this store. Stop the sequence.
- if (Alias)
+ // If we find a load that alias with this store. Stop the sequence.
+ if (std::any_of(AliasLoadNodes.begin(), AliasLoadNodes.end(),
+ std::bind(std::mem_fn(&DAGCombiner::isAlias), this,
+ std::placeholders::_1, StoreNodes[i].MemNode)))
break;
// Mark this node as useful.
OpenPOWER on IntegriCloud