This is an archive of the discontinued LLVM Phabricator instance.

[lld] Add --lto-debug-pass-manager option
ClosedPublic

Authored by ellis on May 30 2023, 12:56 PM.

Details

Reviewers
MaskRay
xur
int3
Group Reviewers
Restricted Project
Commits
rGf92410429a2c: [lld] Add --lto-debug-pass-manager option
Summary

Add support for printing the passes run for LTO.

Both ELF and COFF have --lto-debug-pass-manager (-ltodebugpassmanager) to print the compiler passes run during LTO. This is useful to check that a certain compiler pass is run in a test, e.g., https://reviews.llvm.org/D151589

Diff Detail

Event Timeline

ellis created this revision.May 30 2023, 12:56 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 30 2023, 12:56 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ellis published this revision for review.May 30 2023, 1:08 PM
ellis edited the summary of this revision. (Show Details)
ellis added reviewers: MaskRay, xur, int3.
ellis edited the summary of this revision. (Show Details)
Herald added a project: Restricted Project. · View Herald TranscriptMay 30 2023, 1:09 PM
MaskRay accepted this revision as: MaskRay.May 30 2023, 2:31 PM

lto-pass-manager may be a better name.

This revision is now accepted and ready to land.May 30 2023, 2:31 PM
int3 accepted this revision.May 30 2023, 2:33 PM

lto-pass-manager may be a better name.

but (as I understand) this is about *debugging* the pass manager...

ellis added a comment.May 30 2023, 2:38 PM

lto-pass-manager may be a better name.

Also, I think it makes sense to stay consistent with ELF which uses --lto-debug-pass-manager

ellis updated this revision to Diff 526821.May 30 2023, 3:37 PM

Rename test function to foo since _start is not a necessary symbol

This revision was automatically updated to reflect the committed changes.
ellis added a comment.May 31 2023, 2:15 PM

I've landed this while keeping the flag consistent with ELF, but I'm happy to make changes if needed.