[Mlir-commits] [mlir] [mlir] [memref] [transform] Add alloc_to_global op. (PR #211141)

ioana ghiban llvmlistbot at llvm.org
Thu Aug 13 01:08:26 PDT 2026


================
@@ -61,6 +61,32 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
+// CHECK-DAG: memref.global "private" @[[ALLOC:alloc.*]] : memref<2xf32>
+
+// CHECK-DAG: func.func @func_alloc_with_uses(%[[VAL:.*]]: f32, %[[IDX:.*]]: index)
+func.func @func_alloc_with_uses(%val: f32, %idx: index) {
+  // CHECK-DAG: %[[MR:.*]] = memref.get_global @[[ALLOC]] : memref<2xf32>
----------------
ioghiban wrote:

[nit] Here and in other places: I'd use a more suggestive variable name to describe the value’s role. Perhaps something like `BUF`.
`MEMREF` is also fine, though a bit type-oriented. `BUF` feels more semantic and less redundant.

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


More information about the Mlir-commits mailing list