TableGen: Accept itinerary data when checking for schedmodel completeness

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262548 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matthias Braun 2016-03-03 00:04:59 +00:00
parent ef840cb247
commit 0101cb0a0b

View File

@ -1529,9 +1529,6 @@ void CodeGenSchedModels::checkCompleteness() {
bool Complete = true;
bool HadCompleteModel = false;
for (const CodeGenProcModel &ProcModel : procModels()) {
// Note that long-term we should check "CompleteModel", but for now most
// models that claim to be complete are actually not so we use a separate
// "CheckCompleteness" bit.
if (!ProcModel.ModelDef->getValueAsBit("CompleteModel"))
continue;
for (const CodeGenInstruction *Inst : Target.getInstructionsByEnumValue()) {
@ -1550,11 +1547,14 @@ void CodeGenSchedModels::checkCompleteness() {
const CodeGenSchedClass &SC = getSchedClass(SCIdx);
if (!SC.Writes.empty())
continue;
if (SC.ItinClassDef != nullptr)
continue;
const RecVec &InstRWs = SC.InstRWs;
auto I = std::find_if(InstRWs.begin(), InstRWs.end(),
[&ProcModel] (const Record *R) {
return R->getValueAsDef("SchedModel") == ProcModel.ModelDef;
return R->getValueAsDef("SchedModel") ==
ProcModel.ModelDef;
});
if (I == InstRWs.end()) {
PrintError("'" + ProcModel.ModelName + "' lacks information for '" +