[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
Fri Jul 24 02:31:35 PDT 2026
================
@@ -165,6 +157,26 @@ unsigned AMDGPUMachineFunctionInfo::allocateLDSGlobal(const DataLayout &DL,
return Offset;
}
+unsigned
+AMDGPUMachineFunctionInfo::allocateBarrierGlobal(const DataLayout &DL,
+ const GlobalVariable &GV) {
+ assert(AMDGPU::isNamedBarrier(GV));
+ std::optional<unsigned> BarAddr =
+ get32BitAbsoluteAddress(GV, AMDGPUAS::BARRIER);
+ if (!BarAddr)
+ llvm_unreachable("named barrier should have an assigned address");
----------------
ssahasra wrote:
I don't think we are supposed to worry about "bad IR" reaching this point, even in a release build. The verifier is always run on external input, right? Otherwise we would have to upgrade a whole bunch of asserts all across the LLVM codebase.
https://github.com/llvm/llvm-project/pull/209746
More information about the llvm-branch-commits
mailing list