SIGN IN SIGN UP

[wasm-split] Precompute ownership info (NFC) (#8986)

Given a module element name, many parts of the code queries for its
owning modules (where the module element has to be placed) or secondary
modules using that module element. This adds `OwnershipTracker`, which
precomputes and manages that information. All calls to `getOwner` or
`getUsingSecondaries` that required computations iterating on all
secondary modules which can be as many as thousands, has been replaced
with a call that simply returns prcomputed information.

For the Jul 2026 version of the applications received from the Dart
team, #9007 and this combined reduce the running time of wasm-split by
25% for acx_gallery (30.6s -> 22.7s) and by 40% for essentials (225.1s
-> 134.4s).

Suggested in
https://github.com/WebAssembly/binaryen/pull/8832#issuecomment-4714734931.
H
Heejin Ahn committed
7dd128dfcdef05357d2f0ae2dbb6f472ba76c3bd
Parent: 07a6f35
Committed by GitHub <noreply@github.com> on 8/18/2026, 7:56:07 PM