[PATCH] D35081: [ThinLTO] Allow multiple summary entries.

Teresa Johnson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 13 10:07:22 PDT 2017


tejohnson added a comment.

In https://reviews.llvm.org/D35081#808204, @mehdi_amini wrote:

> In https://reviews.llvm.org/D35081#808189, @tejohnson wrote:
>
> > > Alternatively (and likely preferably from a compile-time point of view to limit the list of import), we could keep a map of GUID->Summary and reuse it before trying to select a new callee.
> >
> > Yep, that was my third option. I only hesitate because it seems like it might be better to select the prevailing copy when we can, but perhaps it doesn't matter much.
>
>
> I'm not sure I understand what is your first option? Always selecting the prevailing copy? 
>  Unless doing a topological order for visiting (which I don't think we could reasonably do), I don't see how you can ensure that:  on your first visit you may see the prevailing not eligible, but it may become eligible on the second visit, at which point you need to do something about the first copy you already selected.


My first option was if any copy is under the threshold, simply pick the prevailing copy (it may be over threshold, but assume we want that one anyway). Another possibility is to only allow importing of the prevailing copy, if it is over the inst limit, too bad. The main reason I think that could be better is when we have PGO - the prevailing copy would for sure have the matched PGO data, but the non-prevailing copies may not.


https://reviews.llvm.org/D35081





More information about the cfe-commits mailing list