WebAssembly / WebAssembly/binaryen
Inlining with -Os is suboptimal
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
We are very careful not to increase code size in that mode. And we miss things like an isnan function (which does x != x on the input) being worth inlining if all the callsites have a constant value sent. We'd need to differentiate that from the case of a non-constant value, which means, a more general mechanism for deciding if inlining will reduce code size, which is not trivial.
See https://github.com/AssemblyScript/assemblyscript/pull/592#issuecomment-495710002
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
No file, test, or entry point is named. Start with the linked AssemblyScript pull request discussion, then trace Binaryen's -Os inlining decision; done means defining how constant callsites can be distinguished from non-constant ones without increasing code size, with regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100