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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 02:59:18 PDT 2024


================
@@ -132,6 +132,19 @@ MACHINE_FUNCTION_PASS("require-all-machine-function-properties",
 MACHINE_FUNCTION_PASS("trigger-verifier-error", TriggerVerifierErrorPass())
 #undef MACHINE_FUNCTION_PASS
 
+#ifndef MACHINE_FUNCTION_PASS_WITH_PARAMS
+#define MACHINE_FUNCTION_PASS_WITH_PARAMS(NAME, CLASS, CREATE_PASS, PARSER,    \
+                                          PARAMS)
+#endif
+MACHINE_FUNCTION_PASS_WITH_PARAMS(
+    "regallocfast", "RegAllocFast",
+    [](RegAllocFastPassOptions Opts) { return RegAllocFastPass(Opts); },
+    [PB = this](StringRef Params) {
+      return parseRegAllocFastPassOptions(*PB, Params);
+    },
+    "filter=all|reg-class;clear-vregs;no-clear-vregs")
----------------
arsenm wrote:

This will clash with another PR that changes this to filter individual registers. Maybe just change reg-class to something else?

Also the default should just be clear-vregs. Only need an option for no-clear-vregs? 

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


More information about the llvm-commits mailing list