[PATCH] D19556: [ThinLTO] Emit individual index files for distributed backends

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 23:00:08 PDT 2016


joker.eph added a comment.

Same as before, it'd be nice to have a `llvm-lto` based test to cover this.


================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:283
@@ +282,3 @@
+      SmallVectorImpl<char> &Buffer, const ModuleSummaryIndex &Index,
+      std::map<StringRef, GVSummaryMapTy> *ModuleToSummariesForIndex = nullptr)
+      : BitcodeWriter(Buffer), Index(Index),
----------------
Why not use directly the `ImportMapTy` populated by `ComputeCrossModuleImportForModule`?
That would avoid restructuring the data. If the only thing is the use of std::map instead of StringMap for the purpose of stable ordering, let's change what ComputeCrossModuleImportForModule operates on.

================
Comment at: tools/gold/gold-plugin.cpp:1247
@@ +1246,3 @@
+      ModuleToSummariesForIndex[InputFile.file().name] =
+          ModuleToDefinedGVSummaries[InputFile.file().name];
+      auto ModuleImports = ImportLists.find(InputFile.file().name);
----------------
Why?


http://reviews.llvm.org/D19556





More information about the llvm-commits mailing list