llvm.org GIT mirror llvm / 00a96df
[SchedModel] Complete models shouldn't match against itineraries when they don't use them (PR35639) For schedule models that don't use itineraries, checkCompleteness still checks that an instruction has a matching itinerary instead of skipping and going straight to matching the InstRWs. That doesn't seem to match what happens in TargetSchedule.cpp This patch causes problems for a number of models that had been incorrectly flagged as complete. Differential Revision: https://reviews.llvm.org/D43235 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329280 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 2 years ago
5 changed file(s) with 6 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
4545 // instructions)
4646
4747 class SISchedMachineModel : SchedMachineModel {
48 let CompleteModel = 1;
48 let CompleteModel = 0;
4949 // MicroOpBufferSize = 1 means that instructions will always be added
5050 // the ready queue when they become available. This exposes them
5151 // to the register pressure analysis.
2424 int HighLatency = 37;
2525 list UnsupportedFeatures = [];
2626
27 let CompleteModel = 1;
27 let CompleteModel = 0;
2828 let PostRAScheduler = 1;
2929
3030 // FIXME: Remove when all errors have been fixed.
1212 int LoadLatency = 4;
1313 int MispredictPenalty = 8; // TODO: Estimated
1414
15 let CompleteModel = 1;
15 let CompleteModel = 0;
1616
1717 list UnsupportedFeatures = [HasMips32r6, HasMips64r6,
1818 HasMips64, HasMips64r2, HasCnMips,
3232 // A dispatch group is 6 instructions.
3333 let LoopMicroOpBufferSize = 60;
3434
35 let CompleteModel = 1;
35 let CompleteModel = 0;
3636
3737 // Do not support QPX (Quad Processing eXtension) on Power 9.
3838 let UnsupportedFeatures = [HasQPX];
16251625 bool Complete = true;
16261626 bool HadCompleteModel = false;
16271627 for (const CodeGenProcModel &ProcModel : procModels()) {
1628 const bool HasItineraries = ProcModel.hasItineraries();
16281629 if (!ProcModel.ModelDef->getValueAsBit("CompleteModel"))
16291630 continue;
16301631 for (const CodeGenInstruction *Inst : Target.getInstructionsByEnumValue()) {
16451646 const CodeGenSchedClass &SC = getSchedClass(SCIdx);
16461647 if (!SC.Writes.empty())
16471648 continue;
1648 if (SC.ItinClassDef != nullptr &&
1649 if (HasItineraries && SC.ItinClassDef != nullptr &&
16491650 SC.ItinClassDef->getName() != "NoItinerary")
16501651 continue;
16511652