[PATCH] D101633: [AMDGPU] Set number vgprs used in PS shaders based on input registers actually used

David Stuttard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 21 08:02:23 PDT 2021


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


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:1154-1155
   if (isShader(F.getCallingConv())) {
+    bool ProcessingPS =
+        F.getCallingConv() == CallingConv::AMDGPU_PS && !STM.isAmdHsaOS();
+
----------------
sebastian-ne wrote:
> Checking for AMDGPU_PS is enough, having this calling convention in AmdHsaOS would throw an error in SITargetLowering::LowerFormalArguments.
> Also, maybe the name `IsPixelShader` is clearer? (It’s called that in AMDGPUAtomicOptimizer.cpp.)
Actually, removing the AmdHsaOS check causes one of the lit tests to fail: no-hsa-graphics-shaders.ll


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101633



More information about the llvm-commits mailing list