[llvm] r239430 - Replace loop with std::equal. NFC intended.
Benjamin Kramer
benny.kra at googlemail.com
Tue Jun 9 13:41:21 PDT 2015
Author: d0k
Date: Tue Jun 9 15:41:21 2015
New Revision: 239430
URL: http://llvm.org/viewvc/llvm-project?rev=239430&view=rev
Log:
Replace loop with std::equal. NFC intended.
Modified:
llvm/trunk/lib/Analysis/PHITransAddr.cpp
Modified: llvm/trunk/lib/Analysis/PHITransAddr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PHITransAddr.cpp?rev=239430&r1=239429&r2=239430&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/PHITransAddr.cpp (original)
+++ llvm/trunk/lib/Analysis/PHITransAddr.cpp Tue Jun 9 15:41:21 2015
@@ -244,13 +244,7 @@ Value *PHITransAddr::PHITranslateSubExpr
GEPI->getNumOperands() == GEPOps.size() &&
GEPI->getParent()->getParent() == CurBB->getParent() &&
(!DT || DT->dominates(GEPI->getParent(), PredBB))) {
- bool Mismatch = false;
- for (unsigned i = 0, e = GEPOps.size(); i != e; ++i)
- if (GEPI->getOperand(i) != GEPOps[i]) {
- Mismatch = true;
- break;
- }
- if (!Mismatch)
+ if (std::equal(GEPOps.begin(), GEPOps.end(), GEPI->op_begin()))
return GEPI;
}
}
More information about the llvm-commits
mailing list