[PATCH] D143707: [AMDGPU] Allow architected SGPRs for workgroup IDs
Christudasan Devadasan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 10 03:11:37 PST 2023
cdevadas added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h:707
+ Register Reg = HasArchitectedSGPRs ? AMDGPU::TTMP7 : getNextSystemSGPR();
+ unsigned Mask = HasArchitectedSGPRs && hasWorkGroupIDZ() ? 0xffff : ~0u;
+ ArgInfo.WorkGroupIDY = ArgDescriptor::createRegister(Reg, Mask);
----------------
The hasWorkGroupIDZ() will be set to 1 if there is a workgroup IDZ used. Otherwise, this function would return false.
The WorkGroupIDX, WorkGroupIDY, and WorkGroupIDZ fields in the MachineFunctionInfo would have set/reset it by now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143707/new/
https://reviews.llvm.org/D143707
More information about the llvm-commits
mailing list