This is an archive of the discontinued LLVM Phabricator instance.

[NewPM][LTO] Use new pass manager with ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER
AbandonedPublic

Authored by aeubanks on Dec 1 2020, 2:34 PM.

Details

Summary

This changes the default value of llvm::lto::Config::UseNewPM to be the
value of the CMake variable ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER, rather
than always false.

So anybody building with -DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=ON will
now use the new pass manager via these interfaces. This matches Clang.

Diff Detail

Event Timeline

aeubanks created this revision.Dec 1 2020, 2:34 PM
aeubanks requested review of this revision.Dec 1 2020, 2:34 PM
aeubanks planned changes to this revision.Dec 1 2020, 2:37 PM

(not for review yet)

MaskRay added a comment.EditedDec 1 2020, 3:01 PM

In LLD, we generally don't recommend configure-time default values. 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.

@MaskRay this is an internal thing, not something we expect to pass in from the driver based on the platform or anything.

Mehdi's point makes sense, this is internal LLVM stuff that's not platform specific.
But if I were to pass arguments to LLD in the Clang driver, where would that be?

aeubanks abandoned this revision.Jan 7 2021, 2:22 PM

Was split into multiple changes