[PATCH] D143934: [AMDGPU] Do not apply schedule metric for regions with spilling

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 11:45:07 PST 2023


rampitec created this revision.
rampitec added reviewers: kerbowa, alex-t.
Herald added subscribers: kosarev, foad, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl, arsenm.
Herald added a project: All.
rampitec requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

D139710 <https://reviews.llvm.org/D139710> has added a metric to increase schedule's ILP while
staying within the same occupancy. Do not bother to apply this
metric to a region which is known to have spilling, it may result
in spilling to reappear after the previous stage and will do no
good if we already spilling anyway. It may also reduce compile
time a bit for such regions.

Fixes: SWDEV-377300


https://reviews.llvm.org/D143934

Files:
  llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp


Index: llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+++ llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
@@ -1100,6 +1100,10 @@
     return true;
   }
 
+  // Do not attempt to relax schedule even more if we are already spilling.
+  if (isRegionWithExcessRP())
+    return false;
+
   LLVM_DEBUG(
       dbgs()
       << "\n\t      *** In shouldRevertScheduling ***\n"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143934.497058.patch
Type: text/x-patch
Size: 479 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230213/ccb56b45/attachment.bin>


More information about the llvm-commits mailing list