[llvm] [NewPM][CodeGen] Port `regallocfast` to new pass manager (PR #94426)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 16:35:05 PDT 2024


================
@@ -78,9 +78,9 @@ struct MachinePassModel
     auto PA = this->Pass.run(IR, AM);
 
     if constexpr (is_detected<has_get_set_properties_t, PassT>::value)
-      IR.getProperties().set(PassT::getSetProperties());
+      IR.getProperties().set(this->Pass.getSetProperties());
     if constexpr (is_detected<has_get_cleared_properties_t, PassT>::value)
-      IR.getProperties().reset(PassT::getClearedProperties());
+      IR.getProperties().reset(this->Pass.getClearedProperties());
----------------
aeubanks wrote:

I was talking with Chandler a while back about the nicest way to do this, and he agreed that my proposal of a helper function that takes in a MachineFunction/MachineFunctionProperties to verify, and manually calling that at the beginning of `run()` was his preferred way. But anyway, not relevant to this PR

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


More information about the llvm-commits mailing list