Page MenuHomePhabricator

[Driver] Remove -fno-experimental-new-pass-manager
ClosedPublic

Authored by MaskRay on Jan 26 2022, 9:04 PM.

Details

Summary

to give users a final warning that they need to migrate away. They could still
use -flegacy-pass-manager for Clang 14.0.0, but the functionality may not work
for 15.0.0.

-fexperimental-new-pass-manager is a no-op for default builds, so not urgent to
be removed for 14.0.0.

clang/test/Frontend/optimization-remark-with-hotness.c is removed because its
new PM replacement optimization-remark-with-hotness-new-pm.c exists.

Diff Detail

Event Timeline

MaskRay created this revision.Jan 26 2022, 9:04 PM
MaskRay requested review of this revision.Jan 26 2022, 9:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2022, 9:04 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

can we also remove the -cc1 option?

can we also remove the -cc1 option?

Some tests will fail if -DLLVM_ENABLE_NEW_PASS_MANAGER=off is specified. But I see 5 tests have failed with -DLLVM_ENABLE_NEW_PASS_MANAGER=off, so perhaps we should not worry too much now.

rg 'clang_cc1.*fexperimental-new-pass-manager' -l => 41

I think the CC1 option can be removed separately.

So this just forces you to change -fno-experimental-new-pass-manager to -flegacy-pass-manager? I'm not sure I see the point.

Note that removal of middle-end LegacyPM functionality is currently blocked on https://reviews.llvm.org/D98481 landing, which prevents NewPM deployment in the Rust ecosystem.

MaskRay added a comment.EditedJan 27 2022, 12:41 AM

So this just forces you to change -fno-experimental-new-pass-manager to -flegacy-pass-manager? I'm not sure I see the point.

Note that removal of middle-end LegacyPM functionality is currently blocked on https://reviews.llvm.org/D98481 landing, which prevents NewPM deployment in the Rust ecosystem.

-flegacy-pass-manager is a new option added in 13.0.0. It did not exist in older releases.
So by making -fno-experimental-new-pass-manager non-functional, it forces the remaining users to migrate, or at least, accept the big warning.

aeubanks accepted this revision.Jan 28 2022, 2:10 PM

I think this is fine, it gives clang users another chance to report new PM blockers

This revision is now accepted and ready to land.Jan 28 2022, 2:10 PM

I think this is fine, it gives clang users another chance to report new PM blockers

Yes. Thanks for accepting this before 14.0.0 branching:)

MaskRay updated this revision to Diff 404163.Jan 28 2022, 2:17 PM

Add -fno-experimental-new-pass-manager to Removed Compiler Flags in release notes

nikic added inline comments.Jan 28 2022, 2:19 PM
clang/docs/ReleaseNotes.rst
112

Would be good to mention -flegacy-pass-manager as the alternative here.

MaskRay updated this revision to Diff 404164.Jan 28 2022, 2:21 PM

Mention -flegacy-pass-manager as a makeshift for 14.0.0

MaskRay marked an inline comment as done.Jan 28 2022, 2:22 PM
nikic accepted this revision.Jan 28 2022, 2:25 PM
This revision was landed with ongoing or failed builds.Jan 28 2022, 2:58 PM
This revision was automatically updated to reflect the committed changes.
kda added a subscriber: kda.Feb 1 2022, 1:22 PM

This looks like it is breaking the sanitizer buildbot for android:
https://lab.llvm.org/buildbot/#/builders/77/builds/13756/steps/21/logs/stdio

Failed Tests (1):
  HWAddressSanitizer-aarch64 :: TestCases/stack-uas.c

This looks like it is breaking the sanitizer buildbot for android:
https://lab.llvm.org/buildbot/#/builders/77/builds/13756/steps/21/logs/stdio

Failed Tests (1):
  HWAddressSanitizer-aarch64 :: TestCases/stack-uas.c

Sorry for the breakage. I cannot test Android. Should be fixed by 9477a308ca6b8536044c9d31a8c89062b514431e, though.