Moved buildReg2RegClassMap() into from X86RegisterInfo to MRegisterInfo, since

it is target-independent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4911 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Misha Brukman 2002-12-04 16:47:04 +00:00
parent 504c411e81
commit 0af0d5bd3e
3 changed files with 8 additions and 17 deletions

View File

@ -61,7 +61,7 @@ public:
virtual unsigned getDataSize() const { return 0; }
virtual void
void
buildReg2RegClassMap(std::map<unsigned,const TargetRegisterClass*>&
Reg2RegClassMap) const
{
@ -146,7 +146,13 @@ public:
virtual void
buildReg2RegClassMap(std::map<unsigned,const TargetRegisterClass*>&
Reg2RegClassMap) const=0;
Reg2RegClassMap) const {
for (MRegisterInfo::const_iterator I = const_regclass_begin(),
E = const_regclass_end(); I != E; ++I) {
I->buildReg2RegClassMap(Reg2RegClassMap);
}
}
};
#endif

View File

@ -69,15 +69,3 @@ const unsigned* X86RegisterInfo::getCallerSaveRegs() const {
MRegisterInfo::NoRegister };
return CallerSaveRegs;
}
void
X86RegisterInfo::buildReg2RegClassMap
(std::map<unsigned,
const TargetRegisterClass*>& Reg2RegClassMap) const
{
for (MRegisterInfo::const_iterator I = const_regclass_begin(),
E = const_regclass_end(); I != E; ++I)
{
I->buildReg2RegClassMap(Reg2RegClassMap);
}
}

View File

@ -43,9 +43,6 @@ struct X86RegisterInfo : public MRegisterInfo {
unsigned getNumRegClasses() const;
void buildReg2RegClassMap(std::map<unsigned,const TargetRegisterClass*>&
Reg2RegClassMap) const;
};
#endif