summaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenTarget.h
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-12-01 00:06:14 +0000
committerNate Begeman <natebegeman@mac.com>2005-12-01 00:06:14 +0000
commitddb395463c08b39090bbee4ed22433f5990a6331 (patch)
tree8cfd00e63c7f6da4106e04371999aaf5be111770 /utils/TableGen/CodeGenTarget.h
parent8ef9d16d3913db11c89fc2d14899e153bdbdc91b (diff)
downloadllvm-ddb395463c08b39090bbee4ed22433f5990a6331.tar.gz
llvm-ddb395463c08b39090bbee4ed22433f5990a6331.tar.bz2
llvm-ddb395463c08b39090bbee4ed22433f5990a6331.tar.xz
Stop checking the ValueType of the CodeGenInstruction. Instead, use the
ValueType from the RegisterClass or Operands. This step is necessary to allow RegisterClasses to have multiple ValueTypes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24555 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.h')
-rw-r--r--utils/TableGen/CodeGenTarget.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenTarget.h b/utils/TableGen/CodeGenTarget.h
index aaa6c7a426..ba538245c6 100644
--- a/utils/TableGen/CodeGenTarget.h
+++ b/utils/TableGen/CodeGenTarget.h
@@ -81,6 +81,15 @@ public:
if (RegisterClasses.empty()) ReadRegisterClasses();
return RegisterClasses;
}
+
+ const CodeGenRegisterClass &getRegisterClass(Record *R) const {
+ const std::vector<CodeGenRegisterClass> &RC = getRegisterClasses();
+ for (unsigned i = 0, e = RC.size(); i != e; ++i)
+ if (RC[i].TheDef == R)
+ return RC[i];
+ assert(0 && "Didn't find the register class");
+ abort();
+ }
const std::vector<MVT::ValueType> &getLegalValueTypes() const {
if (LegalValueTypes.empty()) ReadLegalValueTypes();