diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-03-07 21:22:09 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-03-07 21:22:09 +0000 |
commit | 70a9670d801f9c17f6c8c131e65bab660cf9bbd0 (patch) | |
tree | de273d95290d62cb1ca95bafa40e18ef5325c4d8 /llvm/lib/CodeGen/MachineRegisterInfo.cpp | |
parent | 6733ba826ad83c97fe701fbb1f1e02b53d06e017 (diff) | |
download | llvm-70a9670d801f9c17f6c8c131e65bab660cf9bbd0.zip llvm-70a9670d801f9c17f6c8c131e65bab660cf9bbd0.tar.gz llvm-70a9670d801f9c17f6c8c131e65bab660cf9bbd0.tar.bz2 |
[MachineRegisterInfo] Get rid of the global-isel ifdefs.
One additional pointer is not a big deal size-wise and it makes
the code much nicer!
llvm-svn: 262856
Diffstat (limited to 'llvm/lib/CodeGen/MachineRegisterInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineRegisterInfo.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineRegisterInfo.cpp b/llvm/lib/CodeGen/MachineRegisterInfo.cpp index 313c259..2b81f6b 100644 --- a/llvm/lib/CodeGen/MachineRegisterInfo.cpp +++ b/llvm/lib/CodeGen/MachineRegisterInfo.cpp @@ -103,12 +103,10 @@ MachineRegisterInfo::createVirtualRegister(const TargetRegisterClass *RegClass){ return Reg; } -#ifdef LLVM_BUILD_GLOBAL_ISEL unsigned MachineRegisterInfo::getSize(unsigned VReg) const { - DenseMap<unsigned, unsigned>::const_iterator SizeIt = - VRegToSize.find(VReg); - return SizeIt != VRegToSize.end()? SizeIt->second: 0; + VRegToSizeMap::const_iterator SizeIt = getVRegToSize().find(VReg); + return SizeIt != getVRegToSize().end() ? SizeIt->second : 0; } unsigned @@ -120,13 +118,12 @@ MachineRegisterInfo::createGenericVirtualRegister(unsigned Size) { VRegInfo.grow(Reg); // FIXME: Should we use a dummy register class? VRegInfo[Reg].first = nullptr; - VRegToSize[Reg] = Size; + getVRegToSize()[Reg] = Size; RegAllocHints.grow(Reg); if (TheDelegate) TheDelegate->MRI_NoteNewVirtualRegister(Reg); return Reg; } -#endif // LLVM_BUILD_GLOBAL_ISEL /// clearVirtRegs - Remove all virtual registers (after physreg assignment). void MachineRegisterInfo::clearVirtRegs() { |