Juan Manuel Martinez =?utf-8?q?Caamaño?=,
Juan Manuel Martinez =?utf-8?q?Caamaño?=,
Juan Manuel Martinez =?utf-8?q?Caamaño?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -43,6 +44,29 @@ bool tryExtendLLVMBitcodeMarker(GlobalVariable &Bitcode) {
return true;
}
+bool tryExtendDynamicLDSGlobal(GlobalVariable &GV) {
+ constexpr unsigned WorkgroupAS = 3;
+ const bool IsWorkgroupExternal =
+ GV.hasExternalLinkage() && GV.getAddressSpace() == WorkgroupAS;
+ if (!IsWorkgroupExternal)
+ return false;
+
+ const ArrayType *AT = dyn_cast<ArrayType>(GV.getValueType());
+ if (!AT || AT->getNumElements() != 0)
+ return false;
----------------
s-perron wrote:
Sorry, I did not write that properly.
Could you have, say, a global whose type is a struct containing a 0-sized
array? What do you want to do in case?
```
@lds = external addrspace(3) global {i32, [0 x i32]}
```
https://github.com/llvm/llvm-project/pull/166952
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits