summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAli Tamur <tamur@google.com>2019-04-11 17:35:20 +0000
committerAli Tamur <tamur@google.com>2019-04-11 17:35:20 +0000
commit7822b4618853a41aaa5ee3a7f14e0e32b1d29a64 (patch)
tree16ff223e5739891d3b6f700cb4f6daa63ad7d43a /llvm/lib/CodeGen
parent528b01e998474ac3ada4c5dcc1b99c1d594b0d37 (diff)
downloadbcm5719-llvm-7822b4618853a41aaa5ee3a7f14e0e32b1d29a64.tar.gz
bcm5719-llvm-7822b4618853a41aaa5ee3a7f14e0e32b1d29a64.zip
Revert "Use llvm::lower_bound. NFC"
This reverts commit rL358161. This patch have broken the test: llvm/test/tools/llvm-exegesis/X86/uops-CMOV16rm-noreg.s llvm-svn: 358199
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp3
-rw-r--r--llvm/lib/CodeGen/RegAllocGreedy.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 290d592339f..dc7ba937acb 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -535,7 +535,8 @@ bool IRTranslator::translateExtractValue(const User &U,
uint64_t Offset = getOffsetFromIndices(U, *DL);
ArrayRef<unsigned> SrcRegs = getOrCreateVRegs(*Src);
ArrayRef<uint64_t> Offsets = *VMap.getOffsets(*Src);
- unsigned Idx = llvm::lower_bound(Offsets, Offset) - Offsets.begin();
+ unsigned Idx = std::lower_bound(Offsets.begin(), Offsets.end(), Offset) -
+ Offsets.begin();
auto &DstRegs = allocateVRegs(U);
for (unsigned i = 0; i < DstRegs.size(); ++i)
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index defc30b2c8c..761d09edef4 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -2262,8 +2262,8 @@ unsigned RAGreedy::tryLocalSplit(LiveInterval &VirtReg, AllocationOrder &Order,
ArrayRef<SlotIndex> RMS = LIS->getRegMaskSlotsInBlock(BI.MBB->getNumber());
LLVM_DEBUG(dbgs() << RMS.size() << " regmasks in block:");
// Constrain to VirtReg's live range.
- unsigned ri =
- llvm::lower_bound(RMS, Uses.front().getRegSlot()) - RMS.begin();
+ unsigned ri = std::lower_bound(RMS.begin(), RMS.end(),
+ Uses.front().getRegSlot()) - RMS.begin();
unsigned re = RMS.size();
for (unsigned i = 0; i != NumGaps && ri != re; ++i) {
// Look for Uses[i] <= RMS <= Uses[i+1].
OpenPOWER on IntegriCloud