)]}'
{
  "commit": "3bf53844cfedf09f22d2786e57ef81d5d41fe249",
  "tree": "3969a174dcc56fb6e7153b9e78b10edc2cd3af4e",
  "parents": [
    "496f2ef087e9a182a7aa72fd11f3187baf04272d"
  ],
  "author": {
    "name": "Matthias Springer",
    "email": "me@m-sp.org",
    "time": "Tue Jan 13 15:54:42 2026 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Jan 13 15:54:42 2026 +0100"
  },
  "message": "[mlir][SCF] Fix region branch op interfaces for `scf.forall` and its terminator (#174221)\n\n`scf.forall` does not completely implement the\n`RegionBranchOpInterface`: `scf.forall.in_parallel` does not implement\nthe `RegionBranchTerminatorOpInterface`.\n\nIncomplete interface implementation is a problem for transformations\nthat try to understand the control flow by querying the\n`RegionBranchOpInterface`.\n\nDetailed explanation of what is wrong with the current implementation.\n- There is exactly one region branch point: \"parent\". `in_parallel` is\nnot a region branch point because it does not implement the\n`RegionBranchTerminatorOpInterface`. (Clarified in #174978.)\n- `ForallOp::getSuccessorRegions(parent)` returns one region successors:\nthe region of the `scf.forall` op.\n- Since there is no region branch point in the region, there is no way\nto leave the region. This means: once you enter the region, you are\nstuck in it indefinitely. (It is unspecified what happens once you are\nin the region, but we can be sure that you cannot leave it.)\n\nThis commit adds the `RegionBranchTerminatorOpInterface` (via\n`ReturnLike`) to `scf.forall.in_parallel` to indicate the after leaving\nthe region, the control flow returns to the parent. (Note: Only block\nterminators in directly nested regions can be region branch terminators,\nso `in_parallel` is the only possible op. I.e., `parallel_insert_slice`\ncannot be a region branch terminator.)\n\nThis commit also removes all successor operands / inputs from the\nimplementation. The number of successor operands and successor inputs\nmust match, but `scf.forall.in_parallel` has no operands. Therefore, the\nregion must also have 0 successor inputs. Therefore, the `scf.forall` op\nmust also have 0 successor operands.\n\nThis commit also adds a missing control flow edge from \"parent\" to\n\"parent\": in case of 0 threads, the region is not entered.\n\nDepends on #174978.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7c26d78683de902597e663682ecc9046af118d21",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/Dialect/SCF/IR/SCFOps.td",
      "new_id": "48a377491df02ecc8384edc88c701132c9b8e06e",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/Dialect/SCF/IR/SCFOps.td"
    },
    {
      "type": "modify",
      "old_id": "81a167d3514a37e947f85e87d321ed4da34f3490",
      "old_mode": 33188,
      "old_path": "mlir/lib/Dialect/SCF/IR/SCF.cpp",
      "new_id": "f035eafa461c0ceadba15d2252b5382c83dfb69d",
      "new_mode": 33188,
      "new_path": "mlir/lib/Dialect/SCF/IR/SCF.cpp"
    },
    {
      "type": "modify",
      "old_id": "1ae68553515067c30192485304aea4bb1fcb98fa",
      "old_mode": 33188,
      "old_path": "mlir/test/Analysis/DataFlow/test-dead-code-analysis.mlir",
      "new_id": "7ce5c0f9e3d5aea42992b487e7b8448d327cfb03",
      "new_mode": 33188,
      "new_path": "mlir/test/Analysis/DataFlow/test-dead-code-analysis.mlir"
    }
  ]
}
