Skip to content

Commit 472eecd

Browse files
kerbowajrbyrnes
authored andcommitted
Experimental FA scheduling.
WIP Changes - Custom XDL resource tracking. Assume first 8 cycles of 8-pass mfma stalls the whole pipeline. Prefer MFMA if XDL is free, see `tryXDL` in `tryCand` for heuristic priorities. - Fix exp latency. - Force topdown scheduling in marked regions. - Add `GCNPostSchedStrategy` and `tryCand` overrides for both the default schedulers. - PostRA prefer MFMA with more successors.
1 parent b71fb8f commit 472eecd

File tree

6 files changed

+872
-6
lines changed

6 files changed

+872
-6
lines changed

llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2669,6 +2669,12 @@ void IGroupLPDAGMutation::initSchedGroupBarrierPipelineStage(
26692669
bool IGroupLPDAGMutation::initIGLPOpt(SUnit &SU) {
26702670
IGLPStrategyID StrategyID =
26712671
(IGLPStrategyID)SU.getInstr()->getOperand(0).getImm();
2672+
if (StrategyID == 10) {
2673+
for (auto &SU : DAG->SUnits)
2674+
SU.hasReservedResource = false;
2675+
2676+
return false;
2677+
}
26722678
auto S = createIGLPStrategy(StrategyID, DAG, TII);
26732679
if (!S->shouldApplyStrategy(DAG, Phase))
26742680
return false;

llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ GCNTargetMachine::createMachineScheduler(MachineSchedContext *C) const {
11181118
ScheduleDAGInstrs *
11191119
GCNTargetMachine::createPostMachineScheduler(MachineSchedContext *C) const {
11201120
ScheduleDAGMI *DAG =
1121-
new GCNPostScheduleDAGMILive(C, std::make_unique<PostGenericScheduler>(C),
1121+
new GCNPostScheduleDAGMILive(C, std::make_unique<GCNPostSchedStrategy>(C),
11221122
/*RemoveKillFlags=*/true);
11231123
const GCNSubtarget &ST = C->MF->getSubtarget<GCNSubtarget>();
11241124
DAG->addMutation(createLoadClusterDAGMutation(DAG->TII, DAG->TRI));

0 commit comments

Comments
 (0)