aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/RegAllocLocal.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-09 19:51:00 +0000
committerDan Gohman <gohman@apple.com>2008-07-09 19:51:00 +0000
commit0383bc014c82ce3979416e5fe28caaca59142a05 (patch)
tree64f8b17fc9a0de8200b67654d55c173e3299a059 /lib/CodeGen/RegAllocLocal.cpp
parentf56c2f7a4b03ccb469ac902bed40981cc4ff3b66 (diff)
downloadexternal_llvm-0383bc014c82ce3979416e5fe28caaca59142a05.zip
external_llvm-0383bc014c82ce3979416e5fe28caaca59142a05.tar.gz
external_llvm-0383bc014c82ce3979416e5fe28caaca59142a05.tar.bz2
Use find with std::map, when that's what's needed, instead of lower_bound
with extra checks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53344 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r--lib/CodeGen/RegAllocLocal.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp
index ed45961..7acf982 100644
--- a/lib/CodeGen/RegAllocLocal.cpp
+++ b/lib/CodeGen/RegAllocLocal.cpp
@@ -250,9 +250,9 @@ namespace {
/// to be held on the stack.
int RALocal::getStackSpaceFor(unsigned VirtReg, const TargetRegisterClass *RC) {
// Find the location Reg would belong...
- std::map<unsigned, int>::iterator I =StackSlotForVirtReg.lower_bound(VirtReg);
+ std::map<unsigned, int>::iterator I = StackSlotForVirtReg.find(VirtReg);
- if (I != StackSlotForVirtReg.end() && I->first == VirtReg)
+ if (I != StackSlotForVirtReg.end())
return I->second; // Already has space allocated?
// Allocate a new stack object for this spill location...