This is an archive of the discontinued LLVM Phabricator instance.

[Pipeline] Don't run EarlyFPM in LTO post link
ClosedPublic

Authored by aeubanks on Mar 6 2023, 10:40 AM.

Details

Summary

EarlyFPM cleans up the output of the frontend. This isn't necessary in post link pipelines as the pre link pipeline already ran this.

~0.4% savings in ThinLTO builds:
https://llvm-compile-time-tracker.com/compare.php?from=8a5d4eb775c644d8683f24817d44c510d2b853b7&to=3580252a2162eadca0da99f1eeaa112f74a0353d&stat=instructions:u

Diff Detail

Event Timeline

aeubanks created this revision.Mar 6 2023, 10:40 AM
Herald added a reviewer: ctetreau. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
aeubanks requested review of this revision.Mar 6 2023, 10:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2023, 10:40 AM
aeubanks edited the summary of this revision. (Show Details)Mar 6 2023, 10:40 AM

still need to update tests and make sure this doesn't regress anything, but sending out to make sure that this makes sense to you

still need to update tests and make sure this doesn't regress anything, but sending out to make sure that this makes sense to you

In theory this makes sense, certainly per the comment there. Did you see any surprising test changes?

aeubanks updated this revision to Diff 506813.Mar 20 2023, 6:13 PM

update tests

Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2023, 6:13 PM

still need to update tests and make sure this doesn't regress anything, but sending out to make sure that this makes sense to you

In theory this makes sense, certainly per the comment there. Did you see any surprising test changes?

no, just pipeline tests. I think this is good to go. I ran some benchmarks and didn't see any regressions, but I'll run them one more time before submitting

tejohnson accepted this revision.Mar 21 2023, 6:40 AM

lgtm

llvm/lib/Passes/PassBuilderPipelines.cpp
1009

I am reminded when reviewing this change that this method assumes it is not called during the FullLTOPostLink phase. Which it isn't today, but can you add an assert at the top of this function that the Phase is not FullLTOPostLink since all the checking here would break down if anything changed that?

This revision is now accepted and ready to land.Mar 21 2023, 6:40 AM
aeubanks updated this revision to Diff 507052.Mar 21 2023, 10:50 AM

assert not full lto postlink

nikic added a subscriber: nikic.May 19 2023, 2:31 PM

Any reason why this hasn't been landed yet?

I was trying to get this landed with https://reviews.llvm.org/D145265 so I could measure the impact of the two together. But also now there are some merge conflicts that I'd rather deal with after submitting D145265. But that patch is more likely to get reverted anyway so yeah this should go in first.

This revision was automatically updated to reflect the committed changes.