[PATCH] D23537: [LTO] Simplify APIs and constify (NFC)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 21:29:01 PDT 2016


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

LGTM, thanks. A nit and a comment below.


================
Comment at: include/llvm/Transforms/IPO/FunctionImport.h:117
@@ -116,3 +116,3 @@
     const StringMap<GVSummaryMapTy> &ModuleToDefinedGVSummaries,
-    const StringMap<FunctionImporter::ImportMapTy> &ImportLists,
+    const FunctionImporter::ImportMapTy &ImportListsForModule,
     std::map<std::string, GVSummaryMapTy> &ModuleToSummariesForIndex);
----------------
Suggest making the argument name here and in EmitImportsFiles "ImportList" to be consistent with some of the other places where a single module's import list is passed.

================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:449
@@ -448,3 @@
-  auto ModuleImports = ImportLists.find(ModulePath);
-  if (ModuleImports != ImportLists.end()) {
-    // Include summaries for imports.
----------------
There's a behavior difference here in that we used to check here and in EmitImportsFiles whether the path was in the map, but with the new handling we will construct a default entry if it wasn't in the map when we do ImportLists[ModulePath]. I don't think this is a big deal though.


https://reviews.llvm.org/D23537





More information about the llvm-commits mailing list