[PATCH] D128442: [AMDGPU] GFX11: automatically release VGPRs at the end of the shader

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 24 02:53:59 PDT 2022


foad marked 2 inline comments as done.
foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUReleaseVGPRs.cpp:39
+    AU.setPreservesCFG();
+    MachineFunctionPass::getAnalysisUsage(AU);
+  }
----------------
arsenm wrote:
> Doesn't this preserve everything?
Yes.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUReleaseVGPRs.cpp:97
+
+    for (auto &MI : MBB.terminators()) {
+      // Look for S_ENDPGM instructions
----------------
arsenm wrote:
> Can just check rbegin
That seems like it would make the code a little less neat for no real benefit, since you would have to guard against emty MBBs.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128442



More information about the llvm-commits mailing list