[PATCH] D31937: Move value type list from TargetRegisterClass to TargetRegisterInfo

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 11:18:57 PDT 2017


MatzeB added a comment.

Looks generally good to me, but I think we should rename the function when moving to register info (see below).



================
Comment at: include/llvm/Target/TargetRegisterInfo.h:320
+  /// Return true if the given TargetRegisterClass has the ValueType T.
+  bool hasType(const TargetRegisterClass &RC, MVT T) const {
+    for (int i = 0; RC.VTs[i] != MVT::Other; ++i)
----------------
The name TargetRegisterInfo::hasType feels odd as this isn't a general property of TargetRegisterInfo. Maybe rename to `regclassHasType()`?

Similar with the next two functions (`regclassTypes_begin()` maybe?).


Repository:
  rL LLVM

https://reviews.llvm.org/D31937





More information about the llvm-commits mailing list