[llvm] [AMDGPU] Add scheduling stage to rewrite MFMA from VGPR to AGPR (PR #149367)
Lucas Ramirez via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 17 07:53:48 PDT 2025
================
@@ -401,6 +406,61 @@ class OccInitialScheduleStage : public GCNSchedStage {
: GCNSchedStage(StageID, DAG) {}
};
+class RewriteScheduleStage : public GCNSchedStage {
+private:
+ // Record regions with excess archvgpr register pressure over the physical
+ // register limit. Register pressure in these regions usually will result in
+ // spilling.
+ BitVector RegionsWithExcessArchVGPR;
+
+ MachineBranchProbabilityInfo MBPI;
+ MachineBlockFrequencyInfo MBFI;
+
+ const SIInstrInfo *TII;
+ const SIRegisterInfo *SRI;
+
+ /// Do a speculative rewrite and collect copy locations. The speculative
+ /// rewrite allows us to calulcate the RP of the code after the rewrite, and
----------------
lucas-rami wrote:
```suggestion
/// rewrite allows us to calculate the RP of the code after the rewrite, and
```
https://github.com/llvm/llvm-project/pull/149367
More information about the llvm-commits
mailing list