[PATCH] D135929: [profile] Add binary ids into indexed profiles
Daniel Thornburgh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 21 11:29:26 PDT 2022
mysterymath added inline comments.
================
Comment at: llvm/include/llvm/ProfileData/InstrProf.h:1053
Version8 = 8,
- // The current version is 8.
+ // Binary ids are added.
+ Version9 = 9,
----------------
nit: IDs
================
Comment at: llvm/lib/ProfileData/InstrProfReader.cpp:114
+ // Increment by binary id data length, aligned to 8 bytes.
+ BI += alignToPowerOf2(BILen, sizeof(uint64_t));
+ if (BI > (const uint8_t *)DataBuffer.getBufferEnd())
----------------
nit: Just 8. The comment says "aligned to 8 bytes", so that's the origin of 8, rather than it being the size of a uint64_t.
================
Comment at: llvm/lib/ProfileData/InstrProfWriter.cpp:284
+void InstrProfWriter::addBinaryIds(std::vector<llvm::object::BuildIDRef> BIs) {
+ for (auto BI : BIs) {
----------------
ArrayRef<llvm:object::BuildIDRef>; that way, any vector-like collection can be used here. Also saves a copy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135929/new/
https://reviews.llvm.org/D135929
More information about the llvm-commits
mailing list