[PATCH] D48698: [ThinLTO] Fix printing of module paths for distributed backend indexes

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 10:55:24 PDT 2018


davidxl added inline comments.


================
Comment at: lib/IR/AsmWriter.cpp:790
 
+  void CreateModulePathSlot(StringRef Path);
   void CreateGUIDSlot(GlobalValue::GUID GUID);
----------------
make it an inline function.


================
Comment at: lib/IR/AsmWriter.cpp:1019
+    ModuleIdToPathMap[ModPath.second.first] = ModPath.first();
+  for (auto &ModPair : ModuleIdToPathMap)
+    CreateModulePathSlot(ModPair.second);
----------------
Can these two loops be fused ?


================
Comment at: lib/IR/AsmWriter.cpp:1119
+  // Check for uninitialized state and do lazy initialization.
+  initializeIndex();
+
----------------
probably better to rename the function as initializeIndexIfNeeded or something, but can be done separately.


Repository:
  rL LLVM

https://reviews.llvm.org/D48698





More information about the llvm-commits mailing list