[llvm-dev] [RFC] Expanding the scope of ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER

Fangrui Song via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 1 15:16:36 PST 2020


On 2020-12-01, Arthur Eubanks via llvm-dev wrote:
>On Tue, Dec 1, 2020 at 12:34 PM Arthur Eubanks <aeubanks at google.com> wrote:
>> The ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER CMake flag currently only affects
>> Clang. It should probably also change all other uses of pass managers where
>> possible.
>>
>> There are a couple of uses inside LLD for LTO which already have
>> new/legacy PM flags and should probably look at
>> ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER to determine the default. Some
>> <https://github.com/llvm/llvm-project/blob/1314a4938fba865412598b7227cb4657d59cd8bc/lld/wasm/Driver.cpp#L382>
>> examples
>> <https://github.com/llvm/llvm-project/blob/1314a4938fba865412598b7227cb4657d59cd8bc/llvm/include/llvm/LTO/Config.h#L53>
>> .
>>
>> Also at some point in the future when check-llvm has been fixed to work
>> with opt's -enable-new-pm flag by default, that should also be dependent
>> upon ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER.
>>
>> Any objections?
>>
>https://reviews.llvm.org/D92433 for an example of changing LTO pass manager
>defaults (not ready to submit yet, need to fix a couple things first)

I added a comment on D92433. In lld/ELF, we generally don't recommend
configure-time default values. We expect the compiler driver to handle platform differences
We expect the driver to handle platform differences (e.g. default -pie) and pass
the proper options to LLD. We can default to true and let the clang driver pass
--no-lto-new-pass-manager to LLD if needed.


More information about the llvm-dev mailing list