WebAssembly / WebAssembly/binaryen
Dropped series of load ops to same address could be reduced to single op
Open
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
Inspired by this issue
drop (i32.load $addr, offset=0)
...
drop (i32.load $addr, offset=8)
...
drop (i32.load $addr, offset=16)
Could be reduced to:
drop (i32.load $addr, offset=16) ;; leave only single `load` with highest `offset`
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 WAT example in the issue and trace Binaryen's existing optimizer passes for dropped loads. Add coverage for the same-address, increasing-offset case and verify that only the highest-offset load remains while preserving behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100