[PATCH] D34156: [LTO] Add -femit-summary-index flag to emit summary for regular LTO

Tobias Edler von Koch via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 14:35:23 PDT 2017

tobiasvk added a comment.

In https://reviews.llvm.org/D34156#780714, @mehdi_amini wrote:

> In https://reviews.llvm.org/D34156#780570, @tobiasvk wrote:
> > - Change patch to always emit a module summary for regular LTO
> >
> >   I don't see any real downside of having a summary given the marginal time and space overhead it takes to construct and save it.
> I think some code/logic needs to be changed in LLVM first:
>   bool LTOModule::isThinLTO() {
>     // Right now the detection is only based on the summary presence. We may want
>     // to add a dedicated flag at some point.

No, that check still works. `hasGlobalValueSummary` returns false for regular LTO summaries (since they a have different block ID in the bitcode). I believe @pcc is refactoring these APIs in a separate patch, since the name `hasGlobalValueSummary` doesn't quite reflect its purpose anymore.


More information about the cfe-commits mailing list