This is an archive of the discontinued LLVM Phabricator instance.

[NewPM] Initial pipeline for ThinLTO
AbandonedPublic

Authored by davide on May 22 2017, 6:52 PM.

Details

Summary

As per @timshen request.
I haven't tried this in a while, and a fair amount of things changed, so use with caution, but it's still a good starting point.
Please let me know if you find any problems and I'll try to fix them ASAP.

Diff Detail

Event Timeline

davide created this revision.May 22 2017, 6:52 PM

Also, please note this patch contains also the clang bits. you may want to apply them separately.

timshen edited edge metadata.May 23 2017, 11:36 AM

Hi Davide,

Did you ever use -Xclang=-fthin-link-bitcode? In our build we use this flag, and it turns out not to be handled with/without your patch. See https://github.com/llvm-mirror/clang/blob/0cb0ba28983d349395d2d38bdedcd9129ce556c4/lib/CodeGen/BackendUtil.cpp#L752 .

I'm going to use your patch as a start point and add the flag support.

Hi Davide,

Did you ever use -Xclang=-fthin-link-bitcode? In our build we use this flag, and it turns out not to be handled with/without your patch. See https://github.com/llvm-mirror/clang/blob/0cb0ba28983d349395d2d38bdedcd9129ce556c4/lib/CodeGen/BackendUtil.cpp#L752 .

I'm going to use your patch as a start point and add the flag support.

I think you just need to add the pass to EmitAssemblyWithNewPassManager.
I had that line, but it got lost in the rebase.

https://github.com/llvm-mirror/clang/blob/0cb0ba28983d349395d2d38bdedcd9129ce556c4/lib/CodeGen/BackendUtil.cpp#L1099

chandlerc edited edge metadata.May 25 2017, 2:23 AM

I patched this and re-worked the particular API it uses for exposing the ThinLTO logic into a different surface in https://reviews.llvm.org/D33540 as an alternative approach. Thoughts?

davide abandoned this revision.Jun 1 2017, 3:06 PM

Chandler/Tim landed a different approach, abandoning this one.

lib/Passes/PassBuilder.cpp