Arthur Eubanks via llvm-dev
2021-May-24 18:58 UTC
[llvm-dev] Always running Regular LTO before ThinLTO?
While debugging a ThinLTO issue, I noticed that passes were running more often than I expected. This is being invoked pretty normally, something like $ clang++ -fuse-ld=lld -flto=thin Looks like at [1] we try to first run regular LTO before running ThinLTO. Removing the first line makes the link go from 208s to 115s. Is this expected behavior? [1]: https://github.com/llvm/llvm-project/blob/a64ebb8637277998f77e55d335faca6fdcf5859b/llvm/lib/LTO/LTO.cpp#L1033 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210524/b8fb1cb9/attachment.html>
Arthur Eubanks via llvm-dev
2021-May-24 19:32 UTC
[llvm-dev] Always running Regular LTO before ThinLTO?
Ah I messed something up locally, removing the regular LTO run causes undefined hidden symbol errors for vtables. The `runRegularLTO()` name is confusing though, it apparently sets up some things necessary for ThinLTO. On Mon, May 24, 2021 at 11:58 AM Arthur Eubanks <aeubanks at google.com> wrote:> While debugging a ThinLTO issue, I noticed that passes were running more > often than I expected. This is being invoked pretty normally, something like > $ clang++ -fuse-ld=lld -flto=thin > > Looks like at [1] we try to first run regular LTO before running ThinLTO. > Removing the first line makes the link go from 208s to 115s. Is this > expected behavior? > > [1]: > https://github.com/llvm/llvm-project/blob/a64ebb8637277998f77e55d335faca6fdcf5859b/llvm/lib/LTO/LTO.cpp#L1033 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210524/211b1f40/attachment.html>