)]}'
{
  "commit": "01c3087da5bc163ccef51b42e71109ce9409a7bd",
  "tree": "000cdaf44a7c6d478c3802113dff18e00d10d08c",
  "parents": [
    "bd1ce593556439c793fae879e3003f5aec04ade7"
  ],
  "author": {
    "name": "Nicolas Pitre",
    "email": "nico@fluxnic.net",
    "time": "Thu Nov 12 04:17:30 2026 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Nov 12 09:17:30 2026 +0100"
  },
  "message": "[Stream] Copy resources stored into multiple mutable globals before in-place updates (#25030)\n\nMutable globals are updated in place: once the copy on a\n`util.global.load` is\nelided, tied dispatches write directly into the global\u0027s resource. That\nis\nonly correct if no other global holds the same resource. CSE breaks this\nassumption when two mutable globals have the same splat initializer:\nafter\n`CombineInitializersPass`, one `stream.tensor.splat` is stored into both\nglobals. `ElideAsyncCopiesPass` then removes the clones before the\nin-place\nupdates (\"clone source SSA value has one use\"), so updates to one global\nshow\nup in the other. `FoldGlobals` and `FuseGlobals` later merge the two\nglobals\noutright.\n\n`MaterializeCopyOnWritePass` now treats `util.global.store` into a\nmutable\nglobal as a mutating use. If the stored resource has other uses, it is\ncloned\nbefore the store. As with the other clones this pass inserts,\n`ElideAsyncCopiesPass` removes the ones that are not needed. In the\nbug\u0027s case,\none clone survives in the initializer and canonicalizes into a second\nfill.\nStores into immutable globals are untouched, so CSE\u0027d constants stay\nshared.\n\nImpact, measured on 19 programs with mutable globals (llvm-cpu, local):\n- 15 compile to byte-identical output;\n- the other 4 gain one initializer fill and no per-call copies;\n- 3 of those 4 were previously miscompiled.\n\nDetails are in #25029.\n\nFixes #25029\n\nAssisted-by: Claude Code (Anthropic)\nSigned-off-by: Nicolas Pitre \u003cnpitre@baylibre.com\u003e\n\nSigned-off-by: Nicolas Pitre \u003cnpitre@baylibre.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cb730ae0f8b3aeeb35a8bd172423c418849caea9",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Dialect/Stream/Transforms/MaterializeCopyOnWrite.cpp",
      "new_id": "496df9e83076a283d2081c00598908fe6db6dce8",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Dialect/Stream/Transforms/MaterializeCopyOnWrite.cpp"
    },
    {
      "type": "modify",
      "old_id": "a1509e327a6dee5f4eb150821deaa323bf549847",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Dialect/Stream/Transforms/test/materialize_copy_on_write.mlir",
      "new_id": "38908663b6399096f188e11598887ba52f28e290",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Dialect/Stream/Transforms/test/materialize_copy_on_write.mlir"
    }
  ]
}
