forked from OSchip/llvm-project
Moved buildReg2RegClassMap() into from X86RegisterInfo to MRegisterInfo, since
it is target-independent. llvm-svn: 4911
This commit is contained in:
parent
7b1ec5ed3a
commit
0d28502c32
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,9 +43,6 @@ struct X86RegisterInfo : public MRegisterInfo {
|
|||
|
||||
unsigned getNumRegClasses() const;
|
||||
|
||||
void buildReg2RegClassMap(std::map<unsigned,const TargetRegisterClass*>&
|
||||
Reg2RegClassMap) const;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue