OSDN Git Service

[Driver] Add -f[no-]legacy-pass-manager to supersede -f[no-]experimental-new-pass...
authorFangrui Song <i@maskray.me>
Thu, 10 Dec 2020 00:57:36 +0000 (16:57 -0800)
committerFangrui Song <i@maskray.me>
Thu, 10 Dec 2020 00:57:36 +0000 (16:57 -0800)
commitf9c0d1b0562c4789638a91ce97f1c2d99608005b
tree71308b55324729834fdc9f26ee1515297eaf14e7
parent7adcacda0686b6f73555fbae0beef6b9178fced0
[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
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Driver/Options.td
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/Driver/clang_f_opts.c
clang/test/Driver/flegacy-pass-manager.c [new file with mode: 0644]
clang/test/Driver/gold-lto-new-pass-man.c [deleted file]