[PATCH] D35267: Pass Divergence Analysis data to selection DAG to drive divergence dependent instruction selection
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 08:42:23 PDT 2017
arsenm added inline comments.
================
Comment at: include/llvm/CodeGen/SelectionDAGNodes.h:665-666
+ bool isDivergent() const { return SDNodeBits.IsDivergent; }
+ void setIsDivergent(bool b) { SDNodeBits.IsDivergent = b; }
+
----------------
I have a general concern about this. The way this is used is going to not fit with how SelectionDAG APIs work, and is going to be very invasive. An SDNode is supposed to be immutable and some level of CSE is done by getNode. You can't have an API that involves setting a bit on a newly created node. Anything setting this needs to be done in getNode.
Are divergent and non-divergent nodes CSEable? These need to be handled somewhere to prevent them from folding.
You seem to only specially handle loads, but we have a lot of cases where we have combine issues from not knowing whether it's going to be selected to SALU or VALU instructions. If we have to somehow propagate this on every place a node is produced, that is a massive undertaking. I don't think that at this point it's worth trying to do such a level of work on SelectionDAG with GlobalISel on the way. Only handling loads I thought we could do just from the MemOperand.
================
Comment at: test/CodeGen/AMDGPU/hsa-func.ll:2
+; XFAIL: *
+; REQUIRES: asserts
+
----------------
This should be dropped
https://reviews.llvm.org/D35267
More information about the llvm-commits
mailing list