summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-06-21 05:40:31 +0000
committerFangrui Song <maskray@google.com>2019-06-21 05:40:31 +0000
commitdc8de6037c3aceb9663c7433bb09584fa8571032 (patch)
treeacb49acaa3d1a0428951451a091fcb4d0c79a464 /llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
parentd5e1ce3f44b0bef1eadbef9828b87a8918a82669 (diff)
downloadbcm5719-llvm-dc8de6037c3aceb9663c7433bb09584fa8571032.tar.gz
bcm5719-llvm-dc8de6037c3aceb9663c7433bb09584fa8571032.zip
Simplify std::lower_bound with llvm::{bsearch,lower_bound}. NFC
llvm-svn: 364006
Diffstat (limited to 'llvm/lib/Target/ARM/ARMConstantIslandPass.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMConstantIslandPass.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
index 20154bacbd3..60e5d7bf609 100644
--- a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -875,9 +875,7 @@ void ARMConstantIslands::updateForInsertedWaterBlock(MachineBasicBlock *NewBB) {
// Next, update WaterList. Specifically, we need to add NewMBB as having
// available water after it.
- water_iterator IP =
- std::lower_bound(WaterList.begin(), WaterList.end(), NewBB,
- CompareMBBNumbers);
+ water_iterator IP = llvm::lower_bound(WaterList, NewBB, CompareMBBNumbers);
WaterList.insert(IP, NewBB);
}
@@ -928,9 +926,7 @@ MachineBasicBlock *ARMConstantIslands::splitBlockBeforeInstr(MachineInstr *MI) {
// available water after it (but not if it's already there, which happens
// when splitting before a conditional branch that is followed by an
// unconditional branch - in that case we want to insert NewBB).
- water_iterator IP =
- std::lower_bound(WaterList.begin(), WaterList.end(), OrigBB,
- CompareMBBNumbers);
+ water_iterator IP = llvm::lower_bound(WaterList, OrigBB, CompareMBBNumbers);
MachineBasicBlock* WaterBB = *IP;
if (WaterBB == OrigBB)
WaterList.insert(std::next(IP), NewBB);
OpenPOWER on IntegriCloud