[llvm-branch-commits] [clang] [lld] [llvm] [mlir] [RFC][AMDGPU] Add BARRIER address space (PR #209746)

Sameer Sahasrabuddhe via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jul 23 23:18:02 PDT 2026


================
@@ -182,8 +194,9 @@ AMDGPUMachineFunctionInfo::getLDSKernelIdMetadata(const Function &F) {
 }
 
 std::optional<uint32_t>
-AMDGPUMachineFunctionInfo::getLDSAbsoluteAddress(const GlobalValue &GV) {
-  if (GV.getAddressSpace() != AMDGPUAS::LOCAL_ADDRESS)
+AMDGPUMachineFunctionInfo::get32BitAbsoluteAddress(const GlobalValue &GV,
+                                                   unsigned AS) {
+  if (GV.getAddressSpace() != AS)
----------------
ssahasra wrote:

Feels a bit unclean to me. Shouldn't this be an assert? The GV already knows what address space it is in.

https://github.com/llvm/llvm-project/pull/209746


More information about the llvm-branch-commits mailing list