[PATCH] D148868: [llvm-profdata] ProfileReader cleanup - preparation for MD5 refactoring
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 10:49:47 PDT 2023
davidxl added inline comments.
================
Comment at: llvm/include/llvm/ProfileData/SampleProfReader.h:500
+ /// are present.
+ virtual void setProfileUseMD5() { ProfileIsMD5 = true; }
----------------
Is there a need to make it virtual? Even though text format does not support it, it is harmless to keep the method (it does nothing).
================
Comment at: llvm/include/llvm/ProfileData/SampleProfReader.h:590
+ void setProfileUseMD5() override {
+ assert(false && "Text format sample profile does not support MD5");
----------------
no need for this override.
================
Comment at: llvm/lib/ProfileData/SampleProfReader.cpp:538
+ assert(MD5NameMemStart);
+ auto FID = reinterpret_cast<const uint64_t*>(MD5NameMemStart)[*Idx];
+ SR = MD5StringBuf.emplace_back(std::to_string(FID));
----------------
Can you explain the cleanup done here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148868/new/
https://reviews.llvm.org/D148868
More information about the llvm-commits
mailing list