[PATCH] D34719: [AMDGPU] Implement llvm.amdgcn.set.inactive intrinsic

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 05:13:37 PDT 2017


nhaehnle added inline comments.


================
Comment at: lib/Target/AMDGPU/SIWholeQuadMode.cpp:401-404
+  if (GlobalFlags & StateWQM) {
+    for (MachineInstr *MI : SetInactiveInstrs)
+      markInstruction(*MI, StateWQM, Worklist);
+  }
----------------
cwabbott wrote:
> nhaehnle wrote:
> > Hmm. so automatic propagation of the WQM bit doesn't cover this? It would be nicer if it did, but I don't think it's a big deal in practice. Could you please add an explanatory comment in the code?
> No, it doesn't, since this is doing something different. It's implementing the semantics we talked about, that if *anything* in the program needs WQM then the instruction should be in WQM and the source should be in WQM, to make sure that helper lanes participate in reductions. I don't think that can be handled by any kind of propagation. It's also described in the definition of llvm.amdgcn.set.inactive and tested by test_set_inactive2. I can add a comment here to explain that, though.
Ok, thanks.


https://reviews.llvm.org/D34719





More information about the llvm-commits mailing list