)]}'
{
  "commit": "77679499aee2fa2480416b099651f81e0b151f1e",
  "tree": "2106011f3a040ef88587ef1f80696187307327aa",
  "parents": [
    "f404918453cef6c22774f71a4945cdb187f8e95a"
  ],
  "author": {
    "name": "Steven Fontanella",
    "email": "stevenfont@google.com",
    "time": "Fri May 22 05:01:39 2026"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri May 22 05:01:39 2026"
  },
  "message": "Effect analysis for indirect call expressions (#8625)\n\nPart of #8615. After #8609, we compute effects for indirect call\nexpressions, but only reflect this in the call-site via the effects of\nthe `Function` that contains the indirect call. That let us reason about\neffects only one layer of indirection away, for example in the following\nmodule:\n\n```wasm\n(func $a\n  (call_ref $t (...))\n)\n\n(func $b\n  (call $a)\n)\n```\n\nIf we know that an indirect call to $t can\u0027t possibly have any effects\n(e.g. its only potential target is a nop), we\u0027d be able to optimize away\n`(call $a)` but not the `(call_ref)` itself, since the effects only got\nstored in the effects of `$a`.\n\nThis PR lets us reason about indirect call effects at the expression\nlevel within function bodies by adding a map from HeapType to effects\n`typeEffects` in `wasm::Module`. As a result we can completely optimize\nout the `call_ref` in the above example.\n\nDrive-by fixes:\n* Set an unconditional trap effect on call_indirect when the call type\ndoesn\u0027t match the target table.\n* ~~Correctly set `branchesOut` for `return_call` on\n`call.without.effects`. Previously this would not have a `branchesOut`\neffect which may have allowed incorrect reorderings (we shouldn\u0027t move\nan effectful expression above a `return_call` but we would have allowed\nthis).~~ Will follow up in #8693.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "666765364f7366bde5e0064786d915b8ab035609",
      "old_mode": 33188,
      "old_path": "src/ir/effects.h",
      "new_id": "f28c8c27a2461ebee0e4ddde80d5144aefc9e894",
      "new_mode": 33188,
      "new_path": "src/ir/effects.h"
    },
    {
      "type": "modify",
      "old_id": "69f29101c86e3fd661a046b92b37adede7d06819",
      "old_mode": 33188,
      "old_path": "src/ir/type-updating.cpp",
      "new_id": "7fcd6a4935c30956e37e9def71d4594700309a96",
      "new_mode": 33188,
      "new_path": "src/ir/type-updating.cpp"
    },
    {
      "type": "modify",
      "old_id": "ca82b2b3aeae7db03338991afb079312491caa16",
      "old_mode": 33188,
      "old_path": "src/passes/GlobalEffects.cpp",
      "new_id": "88fb4c0090786a00b97bdb53d1db5fee009ea818",
      "new_mode": 33188,
      "new_path": "src/passes/GlobalEffects.cpp"
    },
    {
      "type": "modify",
      "old_id": "3f40111c451b0e141abd20af94fc8bd68f3b3c8c",
      "old_mode": 33188,
      "old_path": "src/support/utilities.h",
      "new_id": "ae8822bf4e2865bc74361e01734697538d502700",
      "new_mode": 33188,
      "new_path": "src/support/utilities.h"
    },
    {
      "type": "modify",
      "old_id": "df0c19669d3a8253f9abd1a2b473d103a0790fcf",
      "old_mode": 33188,
      "old_path": "src/wasm.h",
      "new_id": "40cdf896c193bcbcf09de6d93a0ab485134b9c00",
      "new_mode": 33188,
      "new_path": "src/wasm.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "888c3edc07ad9ccb3452d5094635dc969ac60535",
      "new_mode": 33188,
      "new_path": "test/lit/passes/global-effects-closed-world-ignore-implicit-traps.wast"
    },
    {
      "type": "modify",
      "old_id": "4c4558f8f95774c9711c1e46252b7fea1c09618a",
      "old_mode": 33188,
      "old_path": "test/lit/passes/global-effects-closed-world-tnh.wast",
      "new_id": "39508c0c565f33d8ac555af4b70ca64802f7b75a",
      "new_mode": 33188,
      "new_path": "test/lit/passes/global-effects-closed-world-tnh.wast"
    },
    {
      "type": "modify",
      "old_id": "77484c63d6dd71210d747e1de83ec6adbe334145",
      "old_mode": 33188,
      "old_path": "test/lit/passes/global-effects-closed-world.wast",
      "new_id": "7b1945fc3a0f323246ab2bafd0bab4db492fa9af",
      "new_mode": 33188,
      "new_path": "test/lit/passes/global-effects-closed-world.wast"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e7ca31ea11b1011ab0a1b0b3b363bbbc49be0a47",
      "new_mode": 33188,
      "new_path": "test/lit/passes/global-effects-indirect-merge.wast"
    }
  ]
}
