[PATCH] D138133: [AMDGPU][GFX11][NFC] Refactor VOPD operands handling (part 2)

Joe Nash via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 14:00:11 PST 2022


Joe_Nash added a comment.

See my comment, otherwise I like it.



================
Comment at: llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h:667
+  // Return the index of the specified src operand in the parsed operands array.
+  unsigned getSrcIndexInParsedOperands(unsigned CompSrcIdx) const {
+    assert(CompSrcIdx < Component::MAX_SRC_NUM);
----------------
Does (Index of Src) vs. (Src Index) imply something different to you? To me it does. My instinct is that (Index of Src) and (Index of Dst) sample from the same list, whereas (Src Index) and (Dst Index) sample from different lists. 

So to me, I would prefer the names getIndexOfDstInParsedOperands and getIndexOfSrcInParsedOperands, since these sample from the same list, the list of parsed operands.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138133/new/

https://reviews.llvm.org/D138133



More information about the llvm-commits mailing list