This is an archive of the discontinued LLVM Phabricator instance.

[Pass Builder] Allow Module Inliner for full lto
ClosedPublic

Authored by IBricchi on Mar 24 2023, 4:44 AM.
Tokens
"Like" token, awarded by mingmingl.

Details

Summary

Currently there is no way to enable the module inliner
when linking with full lto. This patch enables that
option.

Diff Detail

Event Timeline

IBricchi created this revision.Mar 24 2023, 4:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2023, 4:44 AM
IBricchi requested review of this revision.Mar 24 2023, 4:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2023, 4:44 AM
IBricchi edited the summary of this revision. (Show Details)Mar 24 2023, 4:49 AM
aeubanks added inline comments.Mar 24 2023, 7:45 AM
llvm/lib/Passes/PassBuilderPipelines.cpp
1713

formatting is wrong, please run git clang-format

IBricchi updated this revision to Diff 508101.EditedMar 24 2023, 8:05 AM

Sorry about that, should be correct now

taking a closer look, this doesn't make sense. the LTO pipeline doesn't run the function simplification pipeline in ModuleInlinerWrapperPass, but buildModuleInlinerPipeline will run the function simplification pipeline. maybe you just want ModuleInlinerPass?

IBricchi updated this revision to Diff 508529.Mar 27 2023, 1:47 AM

Oh I see. I was trying to copy over the changes from how it was done in the thinLTO pipeline, but you're right, I only really want the ModuleInlinerPass. I've updated the patch to reflect that.

aeubanks accepted this revision.Apr 1 2023, 11:56 PM
This revision is now accepted and ready to land.Apr 1 2023, 11:56 PM

Thanks!

I don't have commit access so would you mind committing it for me, my username is ibricchi and email is ibricchi@student.ethz.ch.

This revision was automatically updated to reflect the committed changes.