diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2016-08-12 04:32:37 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2016-08-12 04:32:37 +0000 |
| commit | c700490f485f78e1d6d1b6577d17ef76066bcf1f (patch) | |
| tree | cb801fcb9b78b8803a9753f4333a0baaf96643a2 /llvm/lib/CodeGen | |
| parent | 0da5afe7172f254226c63f8dcb92d6729d02b959 (diff) | |
| download | bcm5719-llvm-c700490f485f78e1d6d1b6577d17ef76066bcf1f.tar.gz bcm5719-llvm-c700490f485f78e1d6d1b6577d17ef76066bcf1f.zip | |
Use the range variant of remove_if instead of unpacking begin/end
No functionality change is intended.
llvm-svn: 278475
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/LiveInterval.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/StackMaps.cpp | 3 |
3 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp index 93c5ca785ac..df26ce6046a 100644 --- a/llvm/lib/CodeGen/LiveInterval.cpp +++ b/llvm/lib/CodeGen/LiveInterval.cpp @@ -571,7 +571,7 @@ void LiveRange::removeSegment(SlotIndex Start, SlotIndex End, /// Also remove the value# from value# list. void LiveRange::removeValNo(VNInfo *ValNo) { if (empty()) return; - segments.erase(std::remove_if(begin(), end(), [ValNo](const Segment &S) { + segments.erase(remove_if(*this, [ValNo](const Segment &S) { return S.valno == ValNo; }), end()); // Now that ValNo is dead, remove it. diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index d241e377336..2adbe48dc7f 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -790,10 +790,10 @@ MachineBasicBlock *MachineBlockPlacement::selectBestCandidateBlock( // worklist of already placed entries. // FIXME: If this shows up on profiles, it could be folded (at the cost of // some code complexity) into the loop below. - WorkList.erase(std::remove_if(WorkList.begin(), WorkList.end(), - [&](MachineBasicBlock *BB) { - return BlockToChain.lookup(BB) == &Chain; - }), + WorkList.erase(remove_if(WorkList, + [&](MachineBasicBlock *BB) { + return BlockToChain.lookup(BB) == &Chain; + }), WorkList.end()); if (WorkList.empty()) diff --git a/llvm/lib/CodeGen/StackMaps.cpp b/llvm/lib/CodeGen/StackMaps.cpp index 26324c3af47..01ce527e9ae 100644 --- a/llvm/lib/CodeGen/StackMaps.cpp +++ b/llvm/lib/CodeGen/StackMaps.cpp @@ -272,8 +272,7 @@ StackMaps::parseRegisterLiveOutMask(const uint32_t *Mask) const { } LiveOuts.erase( - std::remove_if(LiveOuts.begin(), LiveOuts.end(), - [](const LiveOutReg &LO) { return LO.Reg == 0; }), + remove_if(LiveOuts, [](const LiveOutReg &LO) { return LO.Reg == 0; }), LiveOuts.end()); return LiveOuts; |

