[PATCH] D130784: [AMDGPU] Support LDS spilling

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 29 14:07:49 PDT 2022


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:2560
+  const GCNSubtarget &ST = MF.getSubtarget<GCNSubtarget>();
+  if (MFI->ldsSpillingEnabled(MF) && CallConv == CallingConv::AMDGPU_CS &&
+      ST.getFlatWorkGroupSizes(Fn).second > ST.getWavefrontSize()) {
----------------
Why CS only?


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:2565
+      auto OrigArg = Fn.getArg(Arg.getOrigArgIndex());
+      if (OrigArg->getName().equals("MultiDispatchInfo")) {
+        CCValAssign &VA = ArgLocs[i];
----------------
Matching argument by name is bad, especially if such name can be used by an user.


================
Comment at: llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp:741
+  const GCNSubtarget &ST = MF.getSubtarget<GCNSubtarget>();
+  if (ST.getLdsSpillLimitDwords(MF) == 0)
+    return false;
----------------
This is the most expensive check, it should go last.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130784



More information about the llvm-commits mailing list