[llvm] RFC: [AMDGPU] Select CONVERGENCECTRL_GLUE generically (PR #87509)

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 23:20:24 PDT 2024


ssahasra wrote:

> > I don't really buy this. Yes glue may be used for different reasons, but the way the instruction selector handles it is the same in all cases: it copies the glue operand from the input node to the output node. This is exactly what SDNPInGlue/SDNPOptInGlue enables in the tablegenerated selector.
> 
> Ok. What I am inferring here is that there is at most one glue operand on an instruction, and if multiple nodes need to be glued, they need to be chained (with more glue) to the same operand. This one operand will be preserved with the right properties, and then those glued nodes will be translated by the usual rules. Is that correct?

The counter-example would be the glue operand on the SI_CALL/SI_TCRETURN family of instructions. Currently, the glue operand is a chain of outgoing arguments at the callsite. When I tried to append the token to that chain, it produced errors in the selection process. But then I just appended a second glue operand just for the token, and that seemed to work. I also put a comment in there explaining my assumptions. Maybe that was the wrong way to go about it?

https://github.com/llvm/llvm-project/pull/87509


More information about the llvm-commits mailing list