Carlo Kok via llvm-dev
2018-Mar-30 07:49 UTC
[llvm-dev] Proper way to do thinlto (from code)
I'm using llvm-c (but if needed can call c++ stuff too if nedeed); what's the proper way to emit bitcode with thinlto info so the linker can parallelize ?I'm currently using: unwrap(PMB)->PrepareForThinLTO = b; on the pass manager builder, but that doesn't seem to be enough? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180330/6a95f377/attachment.html>
Peter Collingbourne via llvm-dev
2018-Mar-30 08:02 UTC
[llvm-dev] Proper way to do thinlto (from code)
You need to make sure that your bitcode file has a module summary index. You can do that either by creating a WriteBitcodePass with EmitSummaryIndex set to true or by calling WriteBitcodeToFile with a module summary index that you created yourself. It doesn't look like either of those options are hooked up to the c API, though. Peter On Fri, Mar 30, 2018, 00:50 Carlo Kok via llvm-dev <llvm-dev at lists.llvm.org> wrote:> I'm using llvm-c (but if needed can call c++ stuff too if nedeed); what's > the proper way to emit bitcode with thinlto info so the linker can > parallelize ? > I'm currently using: > unwrap(PMB)->PrepareForThinLTO = b; > > on the pass manager builder, but that doesn't seem to be enough? > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180330/0b197a2d/attachment.html>
Carlo Kok via llvm-dev
2018-Mar-30 08:04 UTC
[llvm-dev] Proper way to do thinlto (from code)
Thanks! I'll create a wrapper for WriteBitcodePass. Do I still need the PrepareForThinTLO pass or is the writeBitCodePass enough? On Fri, Mar 30, 2018, at 10:02, Peter Collingbourne wrote:> You need to make sure that your bitcode file has a module summary > index. You can do that either by creating a WriteBitcodePass with > EmitSummaryIndex set to true or by calling WriteBitcodeToFile with a > module summary index that you created yourself. It doesn't look like > either of those options are hooked up to the c API, though.> > Peter > > On Fri, Mar 30, 2018, 00:50 Carlo Kok via llvm-dev <llvm- > dev at lists.llvm.org> wrote:>> __ >> I'm using llvm-c (but if needed can call c++ stuff too if nedeed); >> what's the proper way to emit bitcode with thinlto info so the linker >> can parallelize ?>> I'm currently using: >> unwrap(PMB)->PrepareForThinLTO = b; >> >> on the pass manager builder, but that doesn't seem to be enough? >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180330/936cac55/attachment.html>