[PATCH] D11721: [ThinLTO] Data structures for holding ThinLTO function index/summary

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 22:49:36 PDT 2015


davidxl added inline comments.

================
Comment at: include/llvm/IR/ThinLTOInfo.h:116
@@ +115,3 @@
+typedef StringMap<ThinLTOFunctionInfoList> ThinLTOFunctionMap;
+typedef StringMap<uint64_t> ThinLTOModulePathStringTable;
+
----------------
Why making a reverse map from stringPath to module id instead of a map from module id to module path?

In the combined summary index, ThinLTOFunctionInfo object should contain a module id field. From that module id, the module path can be obtained.

================
Comment at: include/llvm/IR/ThinLTOInfo.h:124
@@ +123,3 @@
+
+ private:
+  // Map from function name to list of function information instances
----------------
I think it is better to have a ModulePath field in this class -- this field will only be used for per-module SummaryIndex.


http://reviews.llvm.org/D11721





More information about the llvm-commits mailing list