On 01/23/2017 02:50 AM, Richard Biener wrote:
So ideally DOM and EVRP would merge and CCP, copyprop and VRP
would merge. It's probably not possible (or wise) to merge their lattices
(maybe to some extent)
DOM's equivalency tables could be easily superceded by other
implementations. It's just two datastructures. A trivial const/copy table
and a stack to allow unwinding the state of the const/copy table. Throwing
away the basic const/copy table and replacing it with something built by
copyprop ought to be trivial.
The big thing that would be left would be the scoped hash table for tracking
redundant expressions. But I don't think that we'd necessarily have to rip
that out to merge DOM with one of hte other passes.
Hell we know DOM can fit well in any dominator based walk -- we used to do
it as part of the into-ssa transformation.
Sure.
The question is whether we want to make warning "passes" more expensive
by essentially doing a [E]VRP/DOM pass (but not doing any IL transform).
I believe doing that is more reasonable than doing their own hacky analysis.
Having less passes to choose to copy from for such static analysis (and the
ability to tame compile-time by some switches) would be a good thing to have.
Very true. But your comment seemed to be about merging DOM and EVRP or
other passes -- which is certainly possible and possibly even desirable.
The more I look at our SCCVN implementation, the more I want to explore
trying to re-use that infrastructure to simplify DOM.
Jeff