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
This commit is contained in:
Chris Lattner
2005-09-08 21:43:21 +00:00
parent 33c92e9296
commit e9f4ba8dd4
3 changed files with 25 additions and 2 deletions

View File

@ -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 {