diff options
author | Chris Lattner <sabre@nondot.org> | 2005-09-08 21:43:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-09-08 21:43:21 +0000 |
commit | e9f4ba8dd47de9da2a98db3bbe25b54d5a9607f1 (patch) | |
tree | 124f61dc8037c2d4b74211c078899e92b2537e2a /utils/TableGen/CodeGenTarget.cpp | |
parent | 33c92e92961c9a1aaaac767edeeac62dd787111e (diff) |
Compute the value types that are natively supported by a target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23282 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | utils/TableGen/CodeGenTarget.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp index bd02ccdcef..61e237f1bd 100644 --- a/utils/TableGen/CodeGenTarget.cpp +++ b/utils/TableGen/CodeGenTarget.cpp @@ -152,6 +152,7 @@ CodeGenRegisterClass::CodeGenRegisterClass(Record *R) : TheDef(R) { Namespace = R->getValueAsString("Namespace"); SpillSize = R->getValueAsInt("Size"); SpillAlignment = R->getValueAsInt("Alignment"); + VT = getValueType(R->getValueAsDef("RegType")); if (CodeInit *CI = dynamic_cast<CodeInit*>(R->getValueInit("MethodBodies"))) MethodBodies = CI->getValue(); @@ -182,6 +183,11 @@ const std::string &CodeGenRegisterClass::getName() const { return TheDef->getName(); } +void CodeGenTarget::ReadLegalValueTypes() const { + const std::vector<CodeGenRegisterClass> &RCs = getRegisterClasses(); + for (unsigned i = 0, e = RCs.size(); i != e; ++i) + LegalValueTypes.push_back(RCs[i].VT); +} void CodeGenTarget::ReadInstructions() const { |