[clang] [llvm] [SPIR-V] Fixup storage class for global private (PR #116636)
Steven Perron via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 29 08:01:47 PST 2024
================
@@ -3388,6 +3398,13 @@ bool SPIRVInstructionSelector::selectGlobalValue(
GVType, MIRBuilder, SPIRV::AccessQualifier::ReadWrite, false);
}
+ const unsigned AddrSpace = GV->getAddressSpace();
+ SPIRV::StorageClass::StorageClass StorageClass =
+ addressSpaceToStorageClass(AddrSpace, STI);
+
+ SPIRVType *ResType =
+ GR.getOrCreateSPIRVPointerType(PointerBaseType, I, TII, StorageClass);
+
----------------
s-perron wrote:
Why did you move this code here instead if leaving it where it was before? It moves the definitions ways from there use making the code a little harder to read.
https://github.com/llvm/llvm-project/pull/116636
More information about the cfe-commits
mailing list