diff options
author | Craig Topper <craig.topper@gmail.com> | 2015-11-29 04:37:11 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2015-11-29 04:37:11 +0000 |
commit | d0573179dc790b0a866c7e6dc1854590709ce709 (patch) | |
tree | c96b268fdd9148b9cd52cbfbcbac0ed8a652e2af /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | c945c8d22e69f79adca4d63087ab481562e38902 (diff) | |
download | bcm5719-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.cpp | 12 |
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. |