[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 Dec 8 04:43:01 PST 2017


alex-t added a comment.



In https://reviews.llvm.org/D35267#948666, @rampitec wrote:

> There actually can be problem with folding the node if we patch it after creation. At least this needs to be checked.


That's true. The problem is that in SelectionDAG::getNode (where the SCEMap insertion is) we have no Value and no chance to check it's divergence.
And this is correct:  SelectionDAG is for selection and we should not expose the IR Values to it.

The only way I see is to pass the Divergence parameter to getNode from all the SelectionDAGBuilder visitors. This will be correct but requires to change each visitor and getNode().


https://reviews.llvm.org/D35267





More information about the llvm-commits mailing list