Turn on the new pass manager by default
authorArthur Eubanks <aeubanks@google.com>
Mon, 25 Jan 2021 19:00:56 +0000 (11:00 -0800)
committerArthur Eubanks <aeubanks@google.com>
Wed, 3 Feb 2021 22:37:46 +0000 (14:37 -0800)
commit669ddd1e9b1226432b003dbba05b99f8e992285b
treeebc67ae4082af7691b6400f09ff7bd632ec9b709
parentb15cbaf5a03d0b32dbc32c37766e32ccf66e6c87
Turn on the new pass manager by default

This turns on the new pass manager by default for the optimization pipeline in
Clang and ThinLTO in various LLD backends. This also makes uses of `opt
-instcombine` use the new pass manager (unless specifically opted out).

This does not affect the backend target-dependent codegen pipeline.

If this causes regressions, you can opt out of the new pass manager
either via the -DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=OFF CMake flag
while building LLVM, or via various compiler flags, e.g.
-flegacy-pass-manager for Clang or -Wl,--lto-legacy-pass-manager for
ELF LLD. Please file bugs for any regressions.

Major differences:
* The inliner works slightly differently
* -O1 does some amount of inlining
* LCSSA and LoopSimplify are run before all loop passes
* Loop unswitching is implemented slightly differently
* A new SpeculateAroundPHIs pass is added to the pipeline

https://lists.llvm.org/pipermail/llvm-dev/2021-January/148098.html

Reviewed By: asbirlea, ychen, MaskRay, echristo

Differential Revision: https://reviews.llvm.org/D95380
llvm/CMakeLists.txt