[llvm] [AMDGPU] Introduce GCNPostGenericScheduler to model MFMA-VALU coexecution (PR #184084)
Frederik Harwath via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 07:50:19 PDT 2026
================
@@ -802,6 +802,25 @@ class MemoryClauseInitialScheduleStage : public GCNSchedStage {
: GCNSchedStage(StageID, DAG) {}
};
+class GCNPostGenericScheduler : public PostGenericScheduler {
+protected:
+ bool LastTopScheduledIsMFMA = false;
+ bool LastBottomScheduledIsMFMA = false;
+
+public:
+ GCNPostGenericScheduler(const MachineSchedContext *C)
+ : PostGenericScheduler(C) {}
+
+ void initPolicy(MachineBasicBlock::iterator Begin,
+ MachineBasicBlock::iterator End,
+ unsigned NumRegionInstrs) override;
+
+ void schedNode(SUnit *SU, bool IsTopNode) override;
+
+ bool isLastTopScheduledIsMFMA() const { return LastTopScheduledIsMFMA; }
+ bool isLastBottomScheduledIsMFMA() const { return LastBottomScheduledIsMFMA; }
----------------
frederik-h wrote:
I think you should just use the variables directly since there are only internal uses within the class. If you prefer to keep them, I think they shouldn't be public and they could be renamed to, for instance, `lastTopScheduledIsMFMA` or `isLastTopScheduledMFMA` if you prefer to keep the `is` prefix.
https://github.com/llvm/llvm-project/pull/184084
More information about the llvm-commits
mailing list