aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2020-12-09 16:57:36 -0800
committerFangrui Song <i@maskray.me>2020-12-09 16:57:36 -0800
commitf9c0d1b0562c4789638a91ce97f1c2d99608005b (patch)
tree71308b55324729834fdc9f26ee1515297eaf14e7 /clang/lib/Frontend/CompilerInvocation.cpp
parent7adcacda0686b6f73555fbae0beef6b9178fced0 (diff)
downloadllvm-f9c0d1b0562c4789638a91ce97f1c2d99608005b.zip
llvm-f9c0d1b0562c4789638a91ce97f1c2d99608005b.tar.gz
llvm-f9c0d1b0562c4789638a91ce97f1c2d99608005b.tar.bz2
[Driver] Add -f[no-]legacy-pass-manager to supersede -f[no-]experimental-new-pass-manager
The new PM is considered stable and many downstream groups have adopted it (some have adopted it for more than two years). Add -f[no-]legacy-pass-manager to reflect the fact that it is no longer experimental and the legacy pass manager is something we strive to retire. In the future, when the legacy PM eventually goes away, -fno-experimental-new-pass-manager and -flegacy-pass-manager will be removed. This patch also changes -f[no-]legacy-pass-manager to pass `-plugin-opt={new,legacy}-pass-manager` to the linker (supported by both ld.lld and LLVMgold.so) when -flto/-flto=thin is specified Reviewed By: aeubanks, rsmith Differential Revision: https://reviews.llvm.org/D92915
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 6d4e677..be5a644 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1006,10 +1006,10 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
setPGOUseInstrumentor(Opts, Opts.ProfileInstrumentUsePath);
Opts.ProfileRemappingFile =
std::string(Args.getLastArgValue(OPT_fprofile_remapping_file_EQ));
- if (!Opts.ProfileRemappingFile.empty() && !Opts.ExperimentalNewPassManager) {
+ if (!Opts.ProfileRemappingFile.empty() && Opts.LegacyPassManager) {
Diags.Report(diag::err_drv_argument_only_allowed_with)
- << Args.getLastArg(OPT_fprofile_remapping_file_EQ)->getAsString(Args)
- << "-fexperimental-new-pass-manager";
+ << Args.getLastArg(OPT_fprofile_remapping_file_EQ)->getAsString(Args)
+ << "-fno-legacy-pass-manager";
}
Opts.CoverageMapping =
@@ -1051,9 +1051,9 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
// -ftime-report= is only for new pass manager.
if (A->getOption().getID() == OPT_ftime_report_EQ) {
- if (!Opts.ExperimentalNewPassManager)
+ if (Opts.LegacyPassManager)
Diags.Report(diag::err_drv_argument_only_allowed_with)
- << A->getAsString(Args) << "-fexperimental-new-pass-manager";
+ << A->getAsString(Args) << "-fno-legacy-pass-manager";
StringRef Val = A->getValue();
if (Val == "per-pass")