diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -1937,8 +1937,8 @@ Alias; defm legacy_pass_manager : BoolOption<"f", "legacy-pass-manager", CodeGenOpts<"LegacyPassManager">, DefaultFalse, - PosFlag, - NegFlag, + PosFlag, + NegFlag, BothFlags<[CC1Option]>>, Group; def fexperimental_new_pass_manager : Flag<["-"], "fexperimental-new-pass-manager">, Group, Flags<[CC1Option]>, Alias; diff --git a/llvm/docs/NewPassManager.rst b/llvm/docs/NewPassManager.rst --- a/llvm/docs/NewPassManager.rst +++ b/llvm/docs/NewPassManager.rst @@ -480,12 +480,9 @@ the new PM, whereas the backend target-dependent code generation only works with the legacy PM. -For the optimization pipeline, the new PM is the default PM. The legacy PM is -available for the optimization pipeline by setting various compiler/linker -flags, e.g. ``-flegacy-pass-manager`` for ``clang``. - -There will be efforts to deprecate and remove the legacy PM for the -optimization pipeline in the future. +For the optimization pipeline, the new PM is the default PM. Using the legacy PM +for the optimization pipeline is deprecated and there are ongoing efforts to +remove its usage. Some IR passes are considered part of the backend codegen pipeline even if they are LLVM IR passes (whereas all MIR passes are codegen passes). This