[WIP] Rewrite DAE to use a fixed point analysis
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.
@kripken, PTAL. If this seems promising to you, I'm happy to keep working on it.
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.