[PATCH] D128442: [AMDGPU] GFX11: automatically release VGPRs at the end of the shader
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 23 11:43:31 PDT 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUReleaseVGPRs.cpp:39
+ AU.setPreservesCFG();
+ MachineFunctionPass::getAnalysisUsage(AU);
+ }
----------------
Doesn't this preserve everything?
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUReleaseVGPRs.cpp:97
+
+ for (auto &MI : MBB.terminators()) {
+ // Look for S_ENDPGM instructions
----------------
Can just check rbegin
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUReleaseVGPRs.cpp:116
+ bool runOnMachineFunction(MachineFunction &MF) override {
+ if (skipFunction(MF.getFunction()))
+ return false;
----------------
Can also early exit on non-entry calling conventions
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