[PATCH] D92621: [SampleFDO] Store fixed length MD5 in NameTable instead of using ULEB128 if MD5 is used.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 4 23:47:42 PST 2020


hoy accepted this revision.
hoy added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/ProfileData/SampleProfReader.cpp:729
     return EC;
-  NameTable.reserve(*Size);
   MD5StringBuf = std::make_unique<std::vector<std::string>>();
----------------
Nit: this might still be helpful to the non-fixed MD5 path.


================
Comment at: llvm/lib/ProfileData/SampleProfReader.cpp:769
+    // check using the size of NameTable.
+    NameTable.resize(*Size + NameTable.size());
+
----------------
Nit: should `NameTable` be always empty right before here? Could an assert be useful?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92621/new/

https://reviews.llvm.org/D92621



More information about the llvm-commits mailing list