[PATCH] D17028: [ThinLTO] Use MD5 hash in function index.

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 16:59:47 PST 2016


joker.eph added inline comments.

================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:461
@@ -460,1 +460,3 @@
 
+  std::string SourceFileName;
+
----------------
doxygen,  at least pointing to the Module one.

================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:5461
@@ -5451,3 +5460,3 @@
     case bitc::VST_CODE_FNENTRY: {
       // VST_FNENTRY: [valueid, offset, namechar x N]
       if (convertToString(Record, 2, ValueName))
----------------
Typo in the comment: VST_FNENTRY instead of VST_CODE_FNENTRY

================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:5488
@@ -5470,5 +5487,3 @@
     case bitc::VST_CODE_COMBINED_FNENTRY: {
-      // VST_FNENTRY: [offset, namechar x N]
-      if (convertToString(Record, 1, ValueName))
-        return error("Invalid record");
+      // VST_FNENTRY: [offset, funcguid]
       uint64_t FuncSummaryOffset = Record[0];
----------------
Typo in the comment: VST_FNENTRY instead of VST_CODE_COMBINED_FNENTRY


================
Comment at: lib/IR/Module.cpp:50
@@ -49,3 +49,3 @@
 Module::Module(StringRef MID, LLVMContext &C)
-    : Context(C), Materializer(), ModuleID(MID), DL("") {
+    : Context(C), Materializer(), ModuleID(MID), SourceFileName(MID), DL("") {
   ValSymTab = new ValueSymbolTable();
----------------
Can you initialize `SourceFileName` to empty and test in `getSourceFileName()`?

================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:206
@@ -219,1 +205,3 @@
+      // source file name prepended for functions that were originally local
+      // in the source module. Strip any prepended name to recover the original
       // name in the source module.
----------------
I was not very happy with that originally, and it may be a good time to revisit it. 
When does it happen? Why don't we always rename `SrcModule` ?

================
Comment at: tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp:176
@@ -175,2 +175,3 @@
       STRINGIFY_CODE(MODULE_CODE, METADATA_VALUES)
+      STRINGIFY_CODE(MODULE_CODE, SOURCE_FILENAME)
     }
----------------
Test?


http://reviews.llvm.org/D17028





More information about the llvm-commits mailing list