aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenTarget.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-21 04:05:00 +0000
committerChris Lattner <sabre@nondot.org>2004-08-21 04:05:00 +0000
commit056afeface2ac98664ed8fa4799b46178a4a6fe3 (patch)
treeb20825736e75aae16c585715fa1f6feab2fe5233 /utils/TableGen/CodeGenTarget.h
parent7a680c60646fb3b06085f1fe6a7a1917c35010c6 (diff)
Start parsing register classes into a more structured form
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15961 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.h')
-rw-r--r--utils/TableGen/CodeGenTarget.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/utils/TableGen/CodeGenTarget.h b/utils/TableGen/CodeGenTarget.h
index 2d65b7be8e..9b338d88c9 100644
--- a/utils/TableGen/CodeGenTarget.h
+++ b/utils/TableGen/CodeGenTarget.h
@@ -46,8 +46,10 @@ class CodeGenTarget {
mutable std::map<std::string, CodeGenInstruction> Instructions;
mutable std::vector<CodeGenRegister> Registers;
- void ReadInstructions() const;
+ mutable std::vector<CodeGenRegisterClass> RegisterClasses;
void ReadRegisters() const;
+ void ReadRegisterClasses() const;
+ void ReadInstructions() const;
public:
CodeGenTarget();
@@ -73,6 +75,12 @@ public:
return Registers;
}
+ const std::vector<CodeGenRegisterClass> getRegisterClasses() {
+ if (RegisterClasses.empty()) ReadRegisterClasses();
+ return RegisterClasses;
+ }
+
+
/// getInstructions - Return all of the instructions defined for this target.
///
const std::map<std::string, CodeGenInstruction> &getInstructions() const {