TypeSSA could delete exactness

Open
#8,694 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
wasm
Domain
compilers

Research direction

Start by reading the TypeSSA and TypeGeneralizing pass implementations and the prior discussion in #8002. Determine which approach is intended and verify how exactness is handled for descriptor types flowing to struct.new_desc and types used in exact references in public heap types; done means the selected approach has coverage for the remaining cases.

Written by the indexing model from the issue text.

Description

We've previously discussed (e.g. in #8002) that TypeSSA no longer works well now that we automatically refine reference types to be exact wherever possible. The fix we had previously discussed was finishing and using the TypeGeneralizing pass (which might separately be good for code size by reducing the size of the type section) to remove exactness. But we could alternatively have a more crude fix where TypeSSA itself could delete exactness from as many types as possible. The only types for which it would not be able to erase exactness would be descriptor types that may flow into struct.new_desc instructions and any type that appears in an exact reference in a public heap type.

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 20h
Merged PRs (30d)
64

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WebAssembly/binaryen

All issues in WebAssembly/binaryen

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.