26 if (
auto gpuMemorySpace = dyn_cast<gpu::AddressSpaceAttr>(memorySpace))
27 return gpuMemorySpace.getValue() == gpu::AddressSpace::Global;
28 if (
auto intMemorySpace = dyn_cast<IntegerAttr>(memorySpace);
29 LLVM_UNLIKELY(intMemorySpace)) {
30 int64_t memorySpaceValue = intMemorySpace.getInt();
31 return memorySpaceValue == 1 || (allowFlat && memorySpaceValue == 0);
39 if (
auto gpuMemorySpace = dyn_cast<gpu::AddressSpaceAttr>(memorySpace))
40 return gpuMemorySpace.getValue() == gpu::AddressSpace::Workgroup;
41 if (
auto intMemorySpace = dyn_cast<IntegerAttr>(memorySpace);
42 LLVM_UNLIKELY(intMemorySpace)) {
43 int64_t memorySpaceValue = intMemorySpace.getInt();
44 return memorySpaceValue == 3;
52 if (
auto amdgpuMemorySpace = dyn_cast<amdgpu::AddressSpaceAttr>(memorySpace))
53 return amdgpuMemorySpace.getValue() == amdgpu::AddressSpace::FatRawBuffer;
54 if (
auto intMemorySpace = dyn_cast<IntegerAttr>(memorySpace);
55 LLVM_UNLIKELY(intMemorySpace)) {
56 int64_t memorySpaceValue = intMemorySpace.getInt();
57 return memorySpaceValue == 7;