WebAssembly / WebAssembly/binaryen
Improve effects analysis for indirect calls
A pull request for this has already been merged.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
We currently give up computing effects for indirect calls in Binaryen, which halts many optimizations. We can come up with more precise effects in the closed-world case by aggregating the effects of all functions of the given function type into the indirect call.
- Aggregate indirect call effects at the function level (#8609)
- Aggregate indirect call effects for individual call expressions (#8625)
- Prune effects for functions that aren't addressed (#8644)
- Prune effects for indirect calls to exact types (#8807)
- Use indirect call effects in LinearExecutionWalker to allow more optimizations for passes (#8738)
- Optimize indirect calls to uninhabited types to
(unreachable) - Optimize indirect calls to private types in open world
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked GlobalEffects.cpp section and review the completed pull requests listed in the issue to understand the existing indirect-call effects work. Then choose one of the unchecked tasks—exact-type pruning, uninhabited types, or private types—and verify its behavior against the relevant compiler optimization tests; done means the selected case receives more precise effects or the stated optimization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100