[PATCH] D122615: Early return in constrainOperandRegClass()

Viacheslav Nikolaev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 13:41:01 PDT 2022


wvoquine added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/RegisterBankInfo.h:644
+  /// false otherwise.
+  static bool needToConstrainGenericRegister(Register Reg,
+                                             const TargetRegisterClass &RC,
----------------
wvoquine wrote:
> arsenm wrote:
> > I don't see the point of having this be both a separate utility function and a static member. It should be either one or the other
> I just followed the choices made for the corresponding utility functions/methods for `constrainGenericRegister()` and `constrainOperandRegClass()`.
> 
> There's no actual need for the latter to be around at the moment, I can remove the utility function.
> There's no actual need for the latter

I mean, there's no real need for `needToConstrainRegToClass()` at the moment.


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

https://reviews.llvm.org/D122615



More information about the llvm-commits mailing list