[llvm] [CodeGen] change prototype of RegClassFilterFunc (PR #90745)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 02:36:13 PDT 2024


================
@@ -13,19 +13,21 @@
 
 namespace llvm {
 
-class TargetRegisterClass;
 class TargetRegisterInfo;
+class MachineRegisterInfo;
+class Register;
 
 typedef std::function<bool(const TargetRegisterInfo &TRI,
-                           const TargetRegisterClass &RC)> RegClassFilterFunc;
+                           const MachineRegisterInfo &MRI, const Register &Reg)>
+    RegClassFilterFunc;
 
 /// Default register class filter function for register allocation. All virtual
 /// registers should be allocated.
 static inline bool allocateAllRegClasses(const TargetRegisterInfo &,
-                                         const TargetRegisterClass &) {
+                                         const MachineRegisterInfo &,
+                                         const Register &) {
----------------
arsenm wrote:

Register should be passed by value 

https://github.com/llvm/llvm-project/pull/90745


More information about the llvm-commits mailing list