File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1485,15 +1485,17 @@ bool PreRARematStage::initGCNSchedStage() {
14851485 // occupancy in impacted regions.
14861486 REMAT_DEBUG (dbgs () << " ==== REMAT RESULTS ====\n " );
14871487 unsigned DynamicVGPRBlockSize = MFI.getDynamicVGPRBlockSize ();
1488- AchievedOcc = MFI.getMaxWavesPerEU ();
14891488 for (unsigned I : RescheduleRegions.set_bits ()) {
1490- const GCNRegPressure &RP = RPTargets[I].getCurrentRP ();
1491- DAG.Pressure [I] = RP;
1492- unsigned NewRegionOcc = RP.getOccupancy (ST, DynamicVGPRBlockSize);
1493- AchievedOcc = std::min (AchievedOcc, NewRegionOcc);
1494- REMAT_DEBUG (dbgs () << ' [' << I << " ] Achieved occupancy " << NewRegionOcc
1489+ DAG.Pressure [I] = RPTargets[I].getCurrentRP ();
1490+ REMAT_DEBUG (dbgs () << ' [' << I << " ] Achieved occupancy "
1491+ << DAG.Pressure [I].getOccupancy (ST, DynamicVGPRBlockSize)
14951492 << " (" << RPTargets[I] << " )\n " );
14961493 }
1494+ AchievedOcc = MFI.getMaxWavesPerEU ();
1495+ for (const GCNRegPressure &RP : DAG.Pressure ) {
1496+ AchievedOcc =
1497+ std::min (AchievedOcc, RP.getOccupancy (ST, DynamicVGPRBlockSize));
1498+ }
14971499
14981500 REMAT_DEBUG ({
14991501 dbgs () << " Retrying function scheduling with new min. occupancy of "
You can’t perform that action at this time.
0 commit comments