[PATCH] D57367: [DAGCombine] Do several rounds of combine for nodes using SimplifyDemandedBits.

Nirav Dave via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 5 07:59:55 PST 2019


niravd added a comment.

I've been looking at this closely and it's descending in a chain of cleanups, after which I'm hoping we can do this in a more complete way.

I'm currently working on fixing the issue with SelectionDAG where we will leave unused nodes all around until they are cleaned up later in the combine pass or the next pass entirely. During the transient various optimizations relying on single use are disabled. This is another part of why the DAGCombiner fails to run to exhaustion of peephole optimizations. I suspect but have not verified that this a lot of the reason why each iteration makes improvements. I hope to have this up for review in a day or two.

My concern about this approach is that the DeepPatternNodes happening at the end of the iteration (and the multiple iteration) is partially hiding this issue. It'd be much more satisfying if we were adding this directly to the worklist and being handled immediately.

We also need to go a deeper than what we traverse SimplifyDemandedBits. At least we must add the users as well. Adding a variant to do of this catches a bunch of additional cases.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57367/new/

https://reviews.llvm.org/D57367





More information about the llvm-commits mailing list