[PATCH] D133731: [AMDGPU] Add Lower Bound to PipelineSolver

Jannik Silvanus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 00:41:35 PDT 2022


jsilvanus added a comment.

Thanks for implementing this!



================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp:566
+      for (; I != E; I++) {
+        std::vector<std::pair<SUnit *, SUnit *>> AddedEdges;
+        int CandSGID = *I;
----------------
Maybe move the vector out of the loops to reduce allocations, and clear() here instead?


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp:580
+        int TempCost =
+            addEdges(SyncPipeline, CurrSU.first, CandSGID, AddedEdges);
+        if (MinCostForSU == -1 || TempCost < MinCostForSU)
----------------
In addEdges, we could abort once the added cost exceeds MinCostForSU (if MinCostForSU != -1). Not sure if that would be worth the effort.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133731/new/

https://reviews.llvm.org/D133731



More information about the llvm-commits mailing list