[PATCH] D93394: CodeGen: Move function to get subregister indexes to cover a LaneMask

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 06:20:46 PST 2020


foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.

Seems like an obvious refactoring to me. I think the API could be simplified though. How about returning all indices via the SmallVector, and returning a bool failure indication? Or say that if the vector is empty, it means failure?



================
Comment at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:361-362
+  /// the best matching index, or NoSubRegister if this is impossible. If
+  /// multiple subregister indexes are required to exactly cover, they will be
+  /// returned in \p Indexes.
+  unsigned getCoveringSubRegIndexes(MachineRegisterInfo &MRI,
----------------
Maybe "the additional ones will be returned in" would be clearer?


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

https://reviews.llvm.org/D93394



More information about the llvm-commits mailing list