[libclc] [AMDGPU][MachineScheduler] Alternative way to control excess RP. (PR #68004)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 24 05:31:43 PDT 2023


================
@@ -894,10 +894,22 @@ void GCNSchedStage::setupNewBlock() {
 
 void GCNSchedStage::finalizeGCNRegion() {
   DAG.Regions[RegionIdx] = std::pair(DAG.RegionBegin, DAG.RegionEnd);
-  DAG.RescheduleRegions[RegionIdx] = false;
----------------
alex-t wrote:

Should not we mark for rescheduling the "excess RP" regions only?

`if ((NewVGPRRP >= S.VGPRExcessLimit - S.VGPRExcessMargin) ||
      (NewAGPRRP >= S.VGPRExcessLimit - S.VGPRExcessMargin) ||
      (NewSGPRRP >= S.SGPRExcessLimit - S.SGPRExcessMargin)) {
    DAG.RegionsWithExcessRP[RegionIdx] = true;
    DAG.RescheduleRegions[RegionIdx] = true;
  }`

https://github.com/llvm/llvm-project/pull/68004


More information about the cfe-commits mailing list