Page MenuHomePhabricator

[ThinLTO] Option to bypass function importing.
ClosedPublic

Authored by mtrofin on Sep 18 2020, 2:54 PM.

Details

Summary

This completes the circle, complementing -lto-embed-bitcode
(specifically, post-merge-pre-opt). Using -thinlto-assume-merged skips
function importing. The index file is still needed for the other data it
contains.

Diff Detail

Event Timeline

mtrofin created this revision.Sep 18 2020, 2:54 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
mtrofin requested review of this revision.Sep 18 2020, 2:54 PM

Minor comments.

clang/test/CodeGen/thinlto_embed_bitcode.ll
25

Can we do this clang invocation and diff later on so you don't need to redo the opt and llvm-lto steps below?

llvm/include/llvm/LTO/LTOBackend.h
59

Note this is for distributed ThinLTO.

llvm/lib/LTO/LTOBackend.cpp
75

Nit on name/comment. It isn't just thinlto importing (also things like linkage type changes). I'm not sure of a concise name to represent this though. Because we do apply some ThinLTO optimizations from the index later (WPD). Maybe just expand the description to something like "ThinLTO function importing and other pre-optimization pipeline changes."?

mtrofin updated this revision to Diff 293189.Sep 21 2020, 8:46 AM
mtrofin marked 2 inline comments as done.

feedback

mtrofin marked an inline comment as done.Sep 21 2020, 8:46 AM
mtrofin updated this revision to Diff 293506.Sep 22 2020, 10:55 AM

clang tidy

tejohnson accepted this revision.Sep 22 2020, 12:47 PM

lgtm with comment typo fix

llvm/include/llvm/LTO/LTOBackend.h
59

s/lTO/LTO/

This revision is now accepted and ready to land.Sep 22 2020, 12:47 PM
This revision was automatically updated to reflect the committed changes.