[PATCH] D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection

Alexander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 05:08:35 PST 2018


alex-t added a comment.

In https://reviews.llvm.org/D35267#1002305, @efriedma wrote:

> If we're going to include the "divergent" bit in SDNodes, so we can query it all the time, the bit needs to be correct all the time.  The goal of a verifier is to ensure that at any given point, the bits stored in the SelectionDAG are the same as the bits we would compute from scratch.  So code still needs to do the right thing to update the divergence bits, if necessary, but the verifier lets us catch mistakes early.  This is similar to the way we have a domtree verifier, to ensure transforms correctly update the domtree.


Re-computation the bits for the entire DAG any time combiner change something is too expensive.
In this case I'd opt to propagate the bit in ReplaceAllUses methods.


https://reviews.llvm.org/D35267





More information about the llvm-commits mailing list