)]}'
{
  "commit": "77f256070f985029a53da5e76ecd85ca7686a7ea",
  "tree": "593a20c0fa6e3140bb52af0f7515e32e5d783cbc",
  "parents": [
    "a3dfedf09e017b00cb3cf5235c24cc57b96eb5b6"
  ],
  "author": {
    "name": "Fabian Mora",
    "email": "fmora.dev@gmail.com",
    "time": "Mon Sep 01 07:16:17 2025 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Sep 01 11:16:17 2025 +0000"
  },
  "message": "[mlir][ptr] Add load and store ops. (#156093)\n\nThis patch adds the load and store operations to the ptr dialect. It\u0027s\nfuture work to implement SROA and Mem2Reg interfaces, as well as\nconversion to LLVM, and add alias information.\n\nThis patch also fixes a bug in `OptionalProp` that was causing the\nbytecode writer to exit early of writing the Op props if an optional\nprop had the default value.\n\nExample:\n```mlir\nfunc.func @load_ops(%arg0: !ptr.ptr\u003c#ptr.generic_space\u003e) -\u003e (f32, f32, f32, f32, f32, i64, i32) {\n  %0 \u003d ptr.load %arg0 : !ptr.ptr\u003c#ptr.generic_space\u003e -\u003e f32\n  %1 \u003d ptr.load volatile %arg0 : !ptr.ptr\u003c#ptr.generic_space\u003e -\u003e f32\n  %2 \u003d ptr.load %arg0 nontemporal : !ptr.ptr\u003c#ptr.generic_space\u003e -\u003e f32\n  %3 \u003d ptr.load %arg0 invariant : !ptr.ptr\u003c#ptr.generic_space\u003e -\u003e f32\n  %4 \u003d ptr.load %arg0 invariant_group : !ptr.ptr\u003c#ptr.generic_space\u003e -\u003e f32\n  %5 \u003d ptr.load %arg0 atomic monotonic alignment \u003d 8 : !ptr.ptr\u003c#ptr.generic_space\u003e -\u003e i64\n  %6 \u003d ptr.load volatile %arg0 atomic syncscope(\"workgroup\") acquire nontemporal alignment \u003d 4 : !ptr.ptr\u003c#ptr.generic_space\u003e -\u003e i32\n  return %0, %1, %2, %3, %4, %5, %6 : f32, f32, f32, f32, f32, i64, i32\n}\n\nfunc.func @store_ops(%arg0: !ptr.ptr\u003c#ptr.generic_space\u003e, %arg1: f32, %arg2: i64, %arg3: i32) {\n  ptr.store %arg1, %arg0 : f32, !ptr.ptr\u003c#ptr.generic_space\u003e\n  ptr.store volatile %arg1, %arg0 : f32, !ptr.ptr\u003c#ptr.generic_space\u003e\n  ptr.store %arg1, %arg0 nontemporal : f32, !ptr.ptr\u003c#ptr.generic_space\u003e\n  ptr.store %arg1, %arg0 invariant_group : f32, !ptr.ptr\u003c#ptr.generic_space\u003e\n  ptr.store %arg2, %arg0 atomic monotonic alignment \u003d 8 : i64, !ptr.ptr\u003c#ptr.generic_space\u003e\n  ptr.store volatile %arg3, %arg0 atomic syncscope(\"workgroup\") release nontemporal alignment \u003d 4 : i32, !ptr.ptr\u003c#ptr.generic_space\u003e\n  return\n}\n```\n\nFinally, this patch allows testing more advanced features of ptr memory\nspaces, for example:\n```mlir\n// mlir-opt -verify-diagnostics\nfunc.func @store_const(%arg0: !ptr.ptr\u003c#test.const_memory_space\u003e, %arg1: i64) {\n  // expected-error@+1 {{memory space is read-only}}\n  ptr.store %arg1, %arg0 atomic monotonic alignment \u003d 8 : i64, !ptr.ptr\u003c#test.const_memory_space\u003e\n  return\n}\n```",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a0467550c4623d2e328f0ee4a16b65a511bb2f33",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/Ptr/IR/MemorySpaceInterfaces.h",
      "new_id": "3e6754c6bec993a45adae1a1c035c485b530b9d5",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/Ptr/IR/MemorySpaceInterfaces.h"
    },
    {
      "type": "modify",
      "old_id": "54efeb0bc0f9e06b80848802ed01f6087a1eb227",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/Ptr/IR/MemorySpaceInterfaces.td",
      "new_id": "0171b9ca2e5dce3a2296dbce32624ff44c4cc4f2",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/Ptr/IR/MemorySpaceInterfaces.td"
    },
    {
      "type": "modify",
      "old_id": "cc556c61e64165d18e5743f765a2e45989556036",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/Ptr/IR/PtrEnums.td",
      "new_id": "c169f48e573d0e584865da56349cf1e3aaf1b777",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/Ptr/IR/PtrEnums.td"
    },
    {
      "type": "modify",
      "old_id": "440f6e571eec59e23d1917454ce557437863069a",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/Ptr/IR/PtrOps.td",
      "new_id": "1c88efced950ee453fc28259cbeda4ecd749d1e7",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/Ptr/IR/PtrOps.td"
    },
    {
      "type": "modify",
      "old_id": "a6221f9aaaef9734f27dc17f34205aaa80af570c",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/IR/Properties.td",
      "new_id": "a7ade0675b9bb897a7221579d99eff1c58993cbc",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/IR/Properties.td"
    },
    {
      "type": "modify",
      "old_id": "772d25d8a31eeef844527be886622fedd9eb1dcf",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/Ptr/IR/PtrAttrs.cpp",
      "new_id": "dd4e906536cfcac3732011b57bcbb36a33f53168",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/Ptr/IR/PtrAttrs.cpp"
    },
    {
      "type": "modify",
      "old_id": "c5ec0cad941c5687371bcb074d4908ed82006e87",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/Ptr/IR/PtrDialect.cpp",
      "new_id": "bf87f83afc273222cc4c1054476521017dfdba24",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/Ptr/IR/PtrDialect.cpp"
    },
    {
      "type": "modify",
      "old_id": "19fd715e5bba6ee60898b2f82507be5633c41268",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/Ptr/invalid.mlir",
      "new_id": "5702097567fc7d0f9e1ca467397e124252018a7b",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/Ptr/invalid.mlir"
    },
    {
      "type": "modify",
      "old_id": "eed3272d98da9a4392fd9626a98ce62301658d82",
      "old_mode": 33188,
      "old_path": "mlir/test/Dialect/Ptr/ops.mlir",
      "new_id": "dc89489be9efcdf5ef5530eab1a11f227baa0ca0",
      "new_mode": 33188,
      "new_path": "mlir/test/Dialect/Ptr/ops.mlir"
    },
    {
      "type": "modify",
      "old_id": "58909131e50a3cd4f2a64b82e379bbed97dd5489",
      "old_mode": 33188,
      "old_path": "mlir/test/lib/Dialect/Test/TestAttributes.cpp",
      "new_id": "af5f1a3a699a044a3687d3d0b7a01e4e106398f1",
      "new_mode": 33188,
      "new_path": "mlir/test/lib/Dialect/Test/TestAttributes.cpp"
    }
  ]
}
