[llvm] [RFC][AMDGPU] Add vulkan:private/nonprivate MMRAs support (PR #78573)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 05:26:07 PDT 2024


================
@@ -2670,12 +2754,25 @@ bool SIMemoryLegalizer::expandAtomicCmpxchgOrRmw(const SIMemOpInfo &MOI,
   return Changed;
 }
 
+static bool isModuleUsingVulkanMM(MachineFunction &MF) {
+  Module *M = MF.getFunction().getParent();
+  if (auto *MD = mdconst::extract_or_null<ConstantInt>(
+          M->getModuleFlag("amdgpu.vulkan.memory-model")))
+    return MD->getZExtValue() == 1;
+  return false;
+}
+
----------------
arsenm wrote:

This is worse than the chicken bit cl::opt. Moving into the IR makes the IR modal and this more permanent 

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


More information about the llvm-commits mailing list