Skip to content

Port dead store elimination pass from #3858#8456

Open
stevenfontanella wants to merge 8 commits intomainfrom
binaryen-dse
Open

Port dead store elimination pass from #3858#8456
stevenfontanella wants to merge 8 commits intomainfrom
binaryen-dse

Conversation

@stevenfontanella
Copy link
Member

@stevenfontanella stevenfontanella commented Mar 11, 2026

Ported from #3858. Dead store elimination for memories is removed from #3858 because it now seems to incorrectly optimize away some live stores on memory when the offset doesn't match (this was not the case in the PR that this is based on but it's not clear why), rough repro.

Diff of DeadStoreElimination.cpp from original PR: https://editor.mergely.com/Z6sNkKse
Diff of ldse.wast from the original PR: https://editor.mergely.com/T2ScMPzF


My latest analysis showed that this didn't have a large effect on a large candidate binary. Land this anyway as an experimental pass.

@stevenfontanella stevenfontanella force-pushed the binaryen-dse branch 3 times, most recently from ef50399 to f0e3ee2 Compare March 12, 2026 20:45
@stevenfontanella stevenfontanella changed the title Binaryen dse Port dead store elimination pass from #3858 Mar 25, 2026
@stevenfontanella stevenfontanella marked this pull request as ready for review March 25, 2026 23:48
@stevenfontanella stevenfontanella requested a review from a team as a code owner March 25, 2026 23:48
@stevenfontanella stevenfontanella requested review from kripken and tlively and removed request for a team March 25, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant