On 01/24/2017 03:15 AM, Richard Biener wrote:

The more I look at our SCCVN implementation, the more I want to explore
trying to re-use that infrastructure to simplify DOM.

Certainly having a single way to hash/record stmts/expressions on GIMPLE would
be nice.  Not sure if the SCCVN one is perfect (enhancing the memory
part further is on my TODO list).
It doesn't have to be perfect. From my wanderings in its code I think it's probably sufficient to replace 90% of the non-path specific DOM optimizations.

The idea is to do value numbering as an independent step (SCCVN, RPO walk, whatever). Then use a scheduler similar to Click's 95 work to place statements where they belong. The result is far simpler than what DOM does and re-uses the VN framework.


In that world DOM morphs away from generic CSE/simplifications and focuses on path specific stuff. And *that* should be reimplemented as backwards walk with value numbering. It's hard to tease that out right now given how we depend on DOM for generic CSE/simplifications.

Jeff

Reply via email to