Move the list of registers into CodeGenRegBank.

Also move the sub-register index computations from RegisterInfoEmitter
into CodeGenRegBank.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132865 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2011-06-11 00:28:06 +00:00
parent 25255cbe00
commit b5923db192
5 changed files with 254 additions and 208 deletions

View File

@@ -66,10 +66,8 @@ class CodeGenTarget {
mutable DenseMap<const Record*, CodeGenInstruction*> Instructions;
mutable CodeGenRegBank *RegBank;
mutable std::vector<CodeGenRegister> Registers;
mutable std::vector<CodeGenRegisterClass> RegisterClasses;
mutable std::vector<MVT::SimpleValueType> LegalValueTypes;
void ReadRegisters() const;
void ReadRegisterClasses() const;
void ReadInstructions() const;
void ReadLegalValueTypes() const;
@@ -101,8 +99,7 @@ public:
CodeGenRegBank &getRegBank() const;
const std::vector<CodeGenRegister> &getRegisters() const {
if (Registers.empty()) ReadRegisters();
return Registers;
return getRegBank().getRegisters();
}
/// getRegisterByName - If there is a register with the specific AsmName,