diff options
| author | Dan Gohman <gohman@apple.com> | 2009-04-15 01:19:35 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-04-15 01:19:35 +0000 |
| commit | 33f1c68cba4e905fdd2bf7d2848c52052d46fbff (patch) | |
| tree | 5fb0e0a7c2b45ebe07029f03f74a6bd3ff22bc2e /include/llvm/CodeGen | |
| parent | 593ea05957b98472a916278d64229ceda223c50b (diff) | |
Move MachineRegisterInfo::setRegClass out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69126 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
| -rw-r--r-- | include/llvm/CodeGen/MachineRegisterInfo.h | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h index b313fce182..02f9b7c686 100644 --- a/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/include/llvm/CodeGen/MachineRegisterInfo.h @@ -152,23 +152,8 @@ public: /// setRegClass - Set the register class of the specified virtual register. /// - void setRegClass(unsigned Reg, const TargetRegisterClass *RC) { - unsigned VR = Reg; - Reg -= TargetRegisterInfo::FirstVirtualRegister; - assert(Reg < VRegInfo.size() && "Invalid vreg!"); - const TargetRegisterClass *OldRC = VRegInfo[Reg].first; - VRegInfo[Reg].first = RC; - - // Remove from old register class's vregs list. This may be slow but - // fortunately this operation is rarely needed. - std::vector<unsigned> &VRegs = RegClass2VRegMap[OldRC->getID()]; - std::vector<unsigned>::iterator I=std::find(VRegs.begin(), VRegs.end(), VR); - VRegs.erase(I); + void setRegClass(unsigned Reg, const TargetRegisterClass *RC); - // Add to new register class's vregs list. - RegClass2VRegMap[RC->getID()].push_back(VR); - } - /// createVirtualRegister - Create and return a new virtual register in the /// function with the specified register class. /// |
