[llvm] [AMDGPU][MachineScheduler] Alternative way to control excess RP. (PR #68004)
Jeffrey Byrnes via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 12:42:11 PST 2024
================
@@ -1127,16 +1133,23 @@ bool OccInitialScheduleStage::shouldRevertScheduling(unsigned WavesAfter) {
bool UnclusteredHighRPStage::shouldRevertScheduling(unsigned WavesAfter) {
// If RP is not reduced in the unclustered reschedule stage, revert to the
// old schedule.
- if ((WavesAfter <= PressureBefore.getOccupancy(ST) &&
- mayCauseSpilling(WavesAfter)) ||
- GCNSchedStage::shouldRevertScheduling(WavesAfter)) {
- LLVM_DEBUG(dbgs() << "Unclustered reschedule did not help.\n");
- return true;
- }
+ if (DAG.RegionsWithExcessRP[RegionIdx]) {
----------------
jrbyrnes wrote:
After https://github.com/llvm/llvm-project/commit/113052b2b022c4ce45c8003057ae4297d48ed843 , RP.less has excess RP comparisons that this should be consistent with:
```
return (NewVGPRRP > S.VGPRExcessLimit || NewAGPRRP > S.AGPRExcessLimit
|| NewSGPRRP > S.SGPRExcessLimit
|| /* Unified VGPR excess case */ )
&& !PressureAfter.less(ST, PressureBefore);
```
https://github.com/llvm/llvm-project/pull/68004
More information about the llvm-commits
mailing list