diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-01 18:39:53 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-01 18:39:53 +0000 |
commit | f440cc19c931120630c75af142d7c4737ae67a56 (patch) | |
tree | cffe724229d9ebf3440f38466260410aaaecfa76 /lib/CodeGen/RegAllocLinearScan.cpp | |
parent | e5ec955fa42eb1260dcd2b521cf2306284efec45 (diff) | |
download | external_llvm-f440cc19c931120630c75af142d7c4737ae67a56.zip external_llvm-f440cc19c931120630c75af142d7c4737ae67a56.tar.gz external_llvm-f440cc19c931120630c75af142d7c4737ae67a56.tar.bz2 |
Use std::map::count() instead of std::map::find() != std::map::end()
where appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index 202a152..d04bb69 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -340,13 +340,11 @@ bool RA::runOnMachineFunction(MachineFunction &fn) { unsigned rep = li_->rep(reg); assert((MRegisterInfo::isPhysicalRegister(rep) || - v2pMap_.find(rep) != v2pMap_.end() || - v2ssMap_.find(rep) != v2ssMap_.end()) && + v2pMap_.count(rep) || v2ssMap_.count(rep)) && "representative register is not allocated!"); assert(MRegisterInfo::isVirtualRegister(reg) && - v2pMap_.find(reg) == v2pMap_.end() && - v2ssMap_.find(reg) == v2ssMap_.end() && + !v2pMap_.count(reg) && !v2ssMap_.count(reg) && "coalesced register is already allocated!"); if (MRegisterInfo::isPhysicalRegister(rep)) { @@ -772,7 +770,7 @@ void RA::assignVirt2StackSlot(unsigned virtReg) "attempt to assign stack slot to already assigned register?"); // if the virtual register was previously assigned clear the mapping // and free the virtual register - if (v2pMap_.find(virtReg) != v2pMap_.end()) { + if (v2pMap_.count(virtReg)) { clearVirtReg(virtReg); } } |