[llvm-branch-commits] [Clang] Optionally use NewPM to run CodeGen Pipeline (PR #191579)

Jan Svoboda via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jun 24 15:52:50 PDT 2026


================
@@ -4694,6 +4694,15 @@ def floop_interchange : Flag<["-"], "floop-interchange">, Group<f_Group>,
   HelpText<"Enable the loop interchange pass">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;
 def fno_loop_interchange: Flag<["-"], "fno-loop-interchange">, Group<f_Group>,
   HelpText<"Disable the loop interchange pass">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;
+defm enable_new_pm_codegen
+    : BoolFOption<"enable-new-pm-codegen", CodeGenOpts<"EnableNewPMCodeGen">, DefaultFalse,
+                  NegFlag<SetFalse, [], [CC1Option],
+                          "Do not use the NewPM for the Codegen Pipeline">,
+                  PosFlag<SetTrue, [], [CC1Option],
+                          "Use the NewPM for the Codegen Pipeline">,
+                  BothFlags<[], [CC1Option]>>,
----------------
jansvoboda11 wrote:

I think you can drop `BothFlags<[], [CC1Option]>`, because both `NegFlag` and `PosFlag` already specify they are a `CC1Option`. Otherwise the command line handling LGTM.

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


More information about the llvm-branch-commits mailing list