[llvm] [AMDGPU][MachineScheduler] Alternative way to control excess RP. (PR #68004)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 12 00:08:26 PST 2024
================
@@ -904,10 +904,22 @@ void GCNSchedStage::setupNewBlock() {
void GCNSchedStage::finalizeGCNRegion() {
DAG.Regions[RegionIdx] = std::pair(DAG.RegionBegin, DAG.RegionEnd);
- DAG.RescheduleRegions[RegionIdx] = false;
+ PressureAfter = DAG.getRealRegPressure(RegionIdx);
+
if (S.HasHighPressure)
DAG.RegionsWithHighRP[RegionIdx] = true;
+ unsigned NewVGPRRP = PressureAfter.getVGPRNum(false);
+ unsigned NewAGPRRP = PressureAfter.getAGPRNum();
+ unsigned NewSGPRRP = PressureAfter.getSGPRNum();
+
+ if ((NewVGPRRP >= S.VGPRExcessLimit - S.VGPRExcessMargin) ||
+ (NewAGPRRP >= S.VGPRExcessLimit - S.VGPRExcessMargin) ||
----------------
arsenm wrote:
Comparing AGPR to VGPR seems like a copy paste error?
https://github.com/llvm/llvm-project/pull/68004
More information about the llvm-commits
mailing list