[PATCH] D34694: llvm-profdata: Indirect infrequently used fields to reduce memory usage

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 15:47:33 PDT 2017


davidxl accepted this revision.
davidxl added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: lib/ProfileData/InstrProf.cpp:511
+      getOrCreateValueSitesForKind(ValueKind);
   std::vector<InstrProfValueSiteRecord> &OtherSiteRecords =
+      Src.getOrCreateValueSitesForKind(ValueKind);
----------------
dblaikie wrote:
> davidxl wrote:
> > This one should use the read-only version of the API.
> Ah, well, it does need to use the non-const, but not the 'creating' kind. 'merge' takes the InstrProfRecord by non-const ref to call sort on it, it seems, just in case it's not already sorted.
Ok. can you put a comment there (re. using the non-const version)?


https://reviews.llvm.org/D34694





More information about the llvm-commits mailing list