diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-08-12 04:32:42 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-08-12 04:32:42 +0000 |
commit | ac0eb3d821cd322cad8e5f392677057156026039 (patch) | |
tree | 1253020ec0e36e1018adfb3f076cb52138f5b4a4 /lib/Analysis/LoopAccessAnalysis.cpp | |
parent | 5d08e375abfb7fd1973e3c9335d7b880fdd7b4a8 (diff) |
Use the range variant of transform instead of unpacking begin/end
No functionality change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278476 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LoopAccessAnalysis.cpp')
-rw-r--r-- | lib/Analysis/LoopAccessAnalysis.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Analysis/LoopAccessAnalysis.cpp b/lib/Analysis/LoopAccessAnalysis.cpp index 4ae31627f78..cb0388def5e 100644 --- a/lib/Analysis/LoopAccessAnalysis.cpp +++ b/lib/Analysis/LoopAccessAnalysis.cpp @@ -1434,7 +1434,7 @@ MemoryDepChecker::getInstructionsForAccess(Value *Ptr, bool isWrite) const { auto &IndexVector = Accesses.find(Access)->second; SmallVector<Instruction *, 4> Insts; - std::transform(IndexVector.begin(), IndexVector.end(), + transform(IndexVector, std::back_inserter(Insts), [&](unsigned Idx) { return this->InstMap[Idx]; }); return Insts; @@ -1823,9 +1823,8 @@ static SmallVector<std::pair<PointerBounds, PointerBounds>, 4> expandBounds( // Here we're relying on the SCEV Expander's cache to only emit code for the // same bounds once. - std::transform( - PointerChecks.begin(), PointerChecks.end(), - std::back_inserter(ChecksWithBounds), + transform( + PointerChecks, std::back_inserter(ChecksWithBounds), [&](const RuntimePointerChecking::PointerCheck &Check) { PointerBounds First = expandBounds(Check.first, L, Loc, Exp, SE, PtrRtChecking), |