[PATCH] D51330: [ThinLTO] Efficiency fix for writing type id records in per-module indexes

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 08:22:00 PDT 2018


tejohnson added a comment.

In https://reviews.llvm.org/D51330#1218260, @pcc wrote:

> Did you consider changing the type id mapping data structure in `ModuleSummaryIndex` instead of creating a new one? Since we now use a mapping from guids in several places it seems sensible to do that. I think that it would work to change the type of `TypeIdMap` to something like:
>
>   DenseMap<GlobalValue::GUID, TinyPtrVector<std::pair<std::string, TypeIdSummary>>>
>


Sure, I will do that. Looking at the use sites, I don't think we technically need to keep the name. The only place where we seem to really need it is when writing out the type id summaries to assembly, but it is nice from a readability perspective to have the name. It likely isn't going to be high overhead to keep both, so we might as well.


Repository:
  rL LLVM

https://reviews.llvm.org/D51330





More information about the llvm-commits mailing list