Skip to content

Use WTOWorklist in ConstraintAnalysis and RedundantSetElimination - #9216

Open
tlively wants to merge 2 commits into
domtree-wto2from
wto-passes
Open

tlively wants to merge 2 commits into
domtree-wto2from
wto-passes

Conversation

@tlively

@tlively tlively commented Oct 6, 2026

Copy link
Copy Markdown
Member

Replace RPOQueue with WTOWorklist in ConstraintAnalysis and
RedundantSetElimination so that loops stabilize before flow values
propagate to downstream blocks. This avoids quadratic/cubic blowups on
functions with sequential loops while also speeding up general workloads.

Benchmark results across 16 WebAssembly modules (3 iterations):

  • --constraint-analysis:
    • esbuild.wasm: 381.60s -> 7.59s (-98.0%, 50.3x speedup)
    • 15 non-esbuild modules geomean: 1.564s -> 1.487s (-4.9%)
    • 15 non-esbuild modules total: 72.00s -> 57.24s (-20.5%)
    • All 16 modules geomean: 2.205s -> 1.646s (-25.4%)
    • All 16 modules total: 453.60s -> 64.83s (-85.7%)
  • --rse:
    • esbuild.wasm: >600s (timeout) -> 1.62s (>370x speedup)
    • 15 non-esbuild modules total: 26.40s -> 25.47s (-3.5%)
    • All 16 modules geomean: N/A -> 0.922s (total: 27.09s)

Replace RPOQueue with WTOWorklist in ConstraintAnalysis and
RedundantSetElimination so that loops stabilize before flow values
propagate to downstream blocks. This avoids quadratic/cubic blowups on
functions with sequential loops while also speeding up general workloads.

Benchmark results across 16 WebAssembly modules (3 iterations):
- --constraint-analysis:
  - esbuild.wasm: 381.60s -> 7.59s (-98.0%, 50.3x speedup)
  - 15 non-esbuild modules geomean: 1.564s -> 1.487s (-4.9%)
  - 15 non-esbuild modules total: 72.00s -> 57.24s (-20.5%)
  - All 16 modules geomean: 2.205s -> 1.646s (-25.4%)
  - All 16 modules total: 453.60s -> 64.83s (-85.7%)
- --rse:
  - esbuild.wasm: >600s (timeout) -> 1.62s (>370x speedup)
  - 15 non-esbuild modules total: 26.40s -> 25.47s (-3.5%)
  - All 16 modules geomean: N/A -> 0.922s (total: 27.09s)
@tlively
tlively requested a review from kripken October 6, 2026 07:06
@tlively
tlively requested a review from a team as a code owner October 6, 2026 07:07

This branch has not been deployed

No deployments
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