[Mlir-commits] [mlir] [mlir][GPU] Extend gpu.barrier with scope and named-barrier support (PR #195692)

Bangtian Liu llvmlistbot at llvm.org
Mon May 4 15:51:25 PDT 2026


================
@@ -517,6 +518,51 @@ struct GPUShuffleOpLowering : public ConvertOpToLLVMPattern<gpu::ShuffleOp> {
   }
 };
 
+/// Emit an LLVM fence with MMRA metadata based on the given address spaces.
+/// If `addrSpaces` is nullopt, all memory is fenced (global + LDS).
+static void emitFences(std::optional<ArrayAttr> addrSpaces,
+                       ConversionPatternRewriter &rewriter, Location loc,
+                       StringRef scope, bool before) {
----------------
bangtianliu wrote:

Consider:  use enum for scope  instead of StringRef

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


More information about the Mlir-commits mailing list