summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineCopyPropagation.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-08-11 22:21:41 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-08-11 22:21:41 +0000
commit0d955d0bf5cbbd50061309ad2c08c0dcf8f62039 (patch)
tree19991ceb4f16b4e3ce06fe2c39304d27a93b8b7b /llvm/lib/CodeGen/MachineCopyPropagation.cpp
parent332b3b22109e9c0d84456888150c0a30f378f984 (diff)
downloadbcm5719-llvm-0d955d0bf5cbbd50061309ad2c08c0dcf8f62039.tar.gz
bcm5719-llvm-0d955d0bf5cbbd50061309ad2c08c0dcf8f62039.zip
Use the range variant of find instead of unpacking begin/end
If the result of the find is only used to compare against end(), just use is_contained instead. No functionality change is intended. llvm-svn: 278433
Diffstat (limited to 'llvm/lib/CodeGen/MachineCopyPropagation.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCopyPropagation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineCopyPropagation.cpp b/llvm/lib/CodeGen/MachineCopyPropagation.cpp
index 8fdf39d54bd..bf61ee04f9b 100644
--- a/llvm/lib/CodeGen/MachineCopyPropagation.cpp
+++ b/llvm/lib/CodeGen/MachineCopyPropagation.cpp
@@ -245,7 +245,7 @@ void MachineCopyPropagation::CopyPropagateBlock(MachineBasicBlock &MBB) {
// Remember source that's copied to Def. Once it's clobbered, then
// it's no longer available for copy propagation.
RegList &DestList = SrcMap[Src];
- if (std::find(DestList.begin(), DestList.end(), Def) == DestList.end())
+ if (!is_contained(DestList, Def))
DestList.push_back(Def);
continue;
OpenPOWER on IntegriCloud