[PATCH] D119762: AMDGPU: Set up User SGPRs for queue_ptr only when necessary
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 8 07:33:33 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:426
- if (!NeedsQueuePtr) {
- NeedsQueuePtr = checkForQueuePtr(A);
- }
+ // Need implicitarg_ptr to acess queue_ptr, private_base, and shared_base.
+ if (NeedsImplicit)
----------------
Typo acess
================
Comment at: llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp:166-171
+unsigned getQueuePtrImplicitArgPosition() {
+ if (AmdhsaCodeObjectVersion == 5)
+ return 200;
+ llvm_unreachable("queue_ptr is supported only by code object version 5");
+ return 0;
+}
----------------
This isn't a scalable solution for all of the inputs. Should have an enum with offsets or something
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119762/new/
https://reviews.llvm.org/D119762
More information about the llvm-commits
mailing list