[llvm] [AMDGPU][MachineScheduler] Alternative way to control excess RP. (PR #68004)
Piotr Sobczak via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 8 03:13:16 PST 2024
================
@@ -894,10 +894,24 @@ void GCNSchedStage::setupNewBlock() {
void GCNSchedStage::finalizeGCNRegion() {
DAG.Regions[RegionIdx] = std::pair(DAG.RegionBegin, DAG.RegionEnd);
- DAG.RescheduleRegions[RegionIdx] = false;
- if (S.HasHighPressure)
+ PressureAfter = DAG.getRealRegPressure(RegionIdx);
+
+ unsigned NewVGPRRP = PressureAfter.getVGPRNum(false);
+ unsigned NewAGPRRP = PressureAfter.getAGPRNum();
+ unsigned NewSGPRRP = PressureAfter.getSGPRNum();
+
+ if ((NewVGPRRP >= S.VGPRCriticalLimit - S.VGPRExcessMargin) ||
+ (NewAGPRRP >= S.VGPRCriticalLimit - S.VGPRExcessMargin) ||
+ (NewSGPRRP >= S.SGPRCriticalLimit - S.SGPRExcessMargin))
DAG.RegionsWithHighRP[RegionIdx] = true;
+ if ((NewVGPRRP >= S.VGPRExcessLimit - S.VGPRExcessMargin) ||
+ (NewAGPRRP >= S.VGPRExcessLimit - S.SGPRExcessMargin) ||
----------------
piotrAMD wrote:
Looks the conditions here haven't been updated (line 917 and 918).
https://github.com/llvm/llvm-project/pull/68004
More information about the llvm-commits
mailing list