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

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 04:16:39 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")
----------------
paperchalice wrote:

Now renamed to `reg-class`, also update `printPipeline` so we can test output in `--regalloc-npm` in future.

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


More information about the llvm-commits mailing list