[PATCH] D82496: [amdgpu] Add codegen support for HIP dynamic shared memory.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 16:36:22 PDT 2020
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:5585
+ Type *Ty = GV->getValueType();
+ if (DAG.getDataLayout().getTypeAllocSize(Ty).isZero()) {
+ assert(PtrVT == MVT::i32 && "32-bit pointer is expected.");
----------------
Should probably add a comment explaining this is dynamically allocated or something
================
Comment at: llvm/test/CodeGen/AMDGPU/hip.extern.shared.array.ll:3-10
+ at lds0 = addrspace(3) global [512 x float] undef
+ at lds1 = addrspace(3) global [256 x float] undef
+ at lds2 = addrspace(3) global [4096 x float] undef
+ at lds3 = addrspace(3) global [67 x i8] undef
+
+ at dynamic_shared0 = external addrspace(3) global [0 x float]
+ at dynamic_shared1 = external addrspace(3) global [0 x double]
----------------
None of these use an unnaturally high alignment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82496/new/
https://reviews.llvm.org/D82496
More information about the llvm-commits
mailing list