binaryen icon indicating copy to clipboard operation
binaryen copied to clipboard

[WIP] Rewrite DAE to use a fixed point analysis

Open tlively opened this issue 1 month ago • 2 comments

DAE can be slow because it performs several rounds of interleaved analysis and optimization. On top of this, the analysis it performs is not as precise as it could be because it never removes parameters from referenced functions and it cannot optimize unused parameters or results that are forwarded through recursive cycles.

Start improving both the performance and the power of DAE by creating a new pass, called DAE2 for now. DAE2 performs a single parallel walk of the module to collect information with which it performs a fixed point analysis to find unused parameters, then does a single parallel walk of the module to optimize based on this analysis.

tlively avatar Dec 03 '25 06:12 tlively

@kripken, PTAL. If this seems promising to you, I'm happy to keep working on it.

tlively avatar Dec 03 '25 06:12 tlively

Good point that this could potentially combine well with the existing DAE pass. I'll let you know once this actually compiles and runs so we can try it out.

tlively avatar Dec 03 '25 17:12 tlively