Improve effects analysis for indirect calls

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

A pull request for this has already been merged.

  • #8593 by @stevenfontanella — merged
  • #8607 by @stevenfontanella — merged
  • #8609 by @stevenfontanella — merged
  • #8625 by @stevenfontanella — merged
  • #8637 by @stevenfontanella — merged
  • #8644 by @stevenfontanella — merged
  • #8823 by @stevenfontanella — merged

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, wasm
Domain
compilers

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.

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
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.