aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/CodeGenTarget.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/TableGen/CodeGenTarget.h')
-rw-r--r--utils/TableGen/CodeGenTarget.h23
1 files changed, 4 insertions, 19 deletions
diff --git a/utils/TableGen/CodeGenTarget.h b/utils/TableGen/CodeGenTarget.h
index 891b2d5..86050fb 100644
--- a/utils/TableGen/CodeGenTarget.h
+++ b/utils/TableGen/CodeGenTarget.h
@@ -65,12 +65,11 @@ class CodeGenTarget {
Record *TargetRec;
mutable DenseMap<const Record*, CodeGenInstruction*> Instructions;
+ mutable CodeGenRegBank *RegBank;
mutable std::vector<CodeGenRegister> Registers;
- mutable std::vector<Record*> SubRegIndices;
mutable std::vector<CodeGenRegisterClass> RegisterClasses;
mutable std::vector<MVT::SimpleValueType> LegalValueTypes;
void ReadRegisters() const;
- void ReadSubRegIndices() const;
void ReadRegisterClasses() const;
void ReadInstructions() const;
void ReadLegalValueTypes() const;
@@ -98,6 +97,9 @@ public:
///
Record *getAsmWriter() const;
+ /// getRegBank - Return the register bank description.
+ CodeGenRegBank &getRegBank() const;
+
const std::vector<CodeGenRegister> &getRegisters() const {
if (Registers.empty()) ReadRegisters();
return Registers;
@@ -107,23 +109,6 @@ public:
/// return it.
const CodeGenRegister *getRegisterByName(StringRef Name) const;
- const std::vector<Record*> &getSubRegIndices() const {
- if (SubRegIndices.empty()) ReadSubRegIndices();
- return SubRegIndices;
- }
-
- // Map a SubRegIndex Record to its number.
- unsigned getSubRegIndexNo(Record *idx) const {
- if (SubRegIndices.empty()) ReadSubRegIndices();
- std::vector<Record*>::const_iterator i =
- std::find(SubRegIndices.begin(), SubRegIndices.end(), idx);
- assert(i != SubRegIndices.end() && "Not a SubRegIndex");
- return (i - SubRegIndices.begin()) + 1;
- }
-
- // Create a new SubRegIndex with the given name.
- Record *createSubRegIndex(const std::string &Name);
-
const std::vector<CodeGenRegisterClass> &getRegisterClasses() const {
if (RegisterClasses.empty()) ReadRegisterClasses();
return RegisterClasses;