[PATCH] D34838: Prototype: Reduce llvm-profdata merge memory usage further

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 15:20:15 PDT 2017


davidxl added inline comments.


================
Comment at: include/llvm/ProfileData/InstrProf.h:600
+  };
+  struct CounterHolder {
+    std::vector<uint64_t> Counts;
----------------
nit: maybe just Counters?  Holder does not provide additional information.


================
Comment at: lib/ProfileData/InstrProf.cpp:504
   if (ThisNumValueSites != OtherNumValueSites) {
-    SIPE.addError(instrprof_error::value_site_count_mismatch);
+    // SIPE.addError(instrprof_error::value_site_count_mismatch);
     return;
----------------
Keep this until the discussion about its fate is resolved.


================
Comment at: lib/ProfileData/InstrProfWriter.cpp:152
+              .second; // FIXME: Avoid copying by fixing the addRecord API
+      SummaryBuilder->addRecord(std::move(R));
 
----------------
Summary Builder does not need name, hash etc. so perfhaps fixing API is the right way.


https://reviews.llvm.org/D34838





More information about the llvm-commits mailing list