[PATCH] D34719: [AMDGPU] Implement llvm.amdgcn.set.inactive intrinsic
Connor Abbott via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 2 19:15:37 PDT 2017
cwabbott added inline comments.
================
Comment at: lib/Target/AMDGPU/SIWholeQuadMode.cpp:401-404
+ if (GlobalFlags & StateWQM) {
+ for (MachineInstr *MI : SetInactiveInstrs)
+ markInstruction(*MI, StateWQM, Worklist);
+ }
----------------
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.
https://reviews.llvm.org/D34719
More information about the llvm-commits
mailing list