mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
* Rename const_regclass_begin/end to just regclass_begin/end
* Regclass iterators need an extra level of pointerness to work right * Pull inverse mapping code out of target description files llvm-svn: 5046
This commit is contained in:
parent
c43cb38245
commit
51cf15cf12
@ -10,7 +10,6 @@
|
||||
#define LLVM_TARGET_MREGISTERINFO_H
|
||||
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
#include <map>
|
||||
#include <assert.h>
|
||||
|
||||
class Type;
|
||||
@ -61,15 +60,6 @@ public:
|
||||
|
||||
virtual unsigned getDataSize() const { return 0; }
|
||||
|
||||
void
|
||||
buildReg2RegClassMap(std::map<unsigned,const TargetRegisterClass*>&
|
||||
Reg2RegClassMap) const
|
||||
{
|
||||
for (unsigned i=0; i < getNumRegs(); ++i) {
|
||||
Reg2RegClassMap[getRegister(i)] = this;
|
||||
}
|
||||
}
|
||||
|
||||
//const std::vector<unsigned> &getRegsInClass(void) { return Regs; }
|
||||
//void getAliases(void);
|
||||
};
|
||||
@ -156,23 +146,13 @@ public:
|
||||
virtual unsigned getStackPointer() const = 0;
|
||||
|
||||
/// Register class iterators
|
||||
typedef const TargetRegisterClass* const_iterator;
|
||||
typedef const TargetRegisterClass** const_iterator;
|
||||
|
||||
virtual const_iterator const_regclass_begin() const = 0;
|
||||
virtual const_iterator const_regclass_end() const = 0;
|
||||
virtual const_iterator regclass_begin() const = 0;
|
||||
virtual const_iterator regclass_end() const = 0;
|
||||
|
||||
virtual unsigned getNumRegClasses() const = 0;
|
||||
virtual const TargetRegisterClass* getRegClassForType(const Type* Ty) const=0;
|
||||
|
||||
virtual void
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user