Skip to content

Commit 1d793b8

Browse files
committedApr 5, 2018
[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 llvm-svn: 329280
1 parent 8eda4b0 commit 1d793b8

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed
 

‎llvm/lib/Target/AMDGPU/SISchedule.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def Write64Bit : SchedWrite;
4646
// instructions)
4747

4848
class SISchedMachineModel : SchedMachineModel {
49-
let CompleteModel = 1;
49+
let CompleteModel = 0;
5050
// MicroOpBufferSize = 1 means that instructions will always be added
5151
// the ready queue when they become available. This exposes them
5252
// to the register pressure analysis.

‎llvm/lib/Target/Mips/MipsScheduleGeneric.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def MipsGenericModel : SchedMachineModel {
2525
int HighLatency = 37;
2626
list<Predicate> UnsupportedFeatures = [];
2727

28-
let CompleteModel = 1;
28+
let CompleteModel = 0;
2929
let PostRAScheduler = 1;
3030

3131
// FIXME: Remove when all errors have been fixed.

‎llvm/lib/Target/Mips/MipsScheduleP5600.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def MipsP5600Model : SchedMachineModel {
1313
int LoadLatency = 4;
1414
int MispredictPenalty = 8; // TODO: Estimated
1515

16-
let CompleteModel = 1;
16+
let CompleteModel = 0;
1717

1818
list<Predicate> UnsupportedFeatures = [HasMips32r6, HasMips64r6,
1919
HasMips64, HasMips64r2, HasCnMips,

‎llvm/lib/Target/PowerPC/PPCScheduleP9.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def P9Model : SchedMachineModel {
3333
// A dispatch group is 6 instructions.
3434
let LoopMicroOpBufferSize = 60;
3535

36-
let CompleteModel = 1;
36+
let CompleteModel = 0;
3737

3838
// Do not support QPX (Quad Processing eXtension) on Power 9.
3939
let UnsupportedFeatures = [HasQPX];

‎llvm/utils/TableGen/CodeGenSchedule.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,7 @@ void CodeGenSchedModels::checkCompleteness() {
16261626
bool Complete = true;
16271627
bool HadCompleteModel = false;
16281628
for (const CodeGenProcModel &ProcModel : procModels()) {
1629+
const bool HasItineraries = ProcModel.hasItineraries();
16291630
if (!ProcModel.ModelDef->getValueAsBit("CompleteModel"))
16301631
continue;
16311632
for (const CodeGenInstruction *Inst : Target.getInstructionsByEnumValue()) {
@@ -1646,7 +1647,7 @@ void CodeGenSchedModels::checkCompleteness() {
16461647
const CodeGenSchedClass &SC = getSchedClass(SCIdx);
16471648
if (!SC.Writes.empty())
16481649
continue;
1649-
if (SC.ItinClassDef != nullptr &&
1650+
if (HasItineraries && SC.ItinClassDef != nullptr &&
16501651
SC.ItinClassDef->getName() != "NoItinerary")
16511652
continue;
16521653

0 commit comments

Comments
 (0)
Please sign in to comment.