[PATCH] D135929: [profile] Add binary ids into indexed profiles

Ellis Hoag via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 14:24:30 PST 2022


ellis accepted this revision.
ellis added a comment.
This revision is now accepted and ready to land.

Seems good to me! I just have some minor nits.



================
Comment at: llvm/lib/ProfileData/InstrProfReader.cpp:98
+    // Read binary id length.
+    uint64_t BILen = endian::byte_swap<uint64_t, little>(
+        *reinterpret_cast<const uint64_t *>(BI));
----------------
Can we use `endian::readNext()` here and remove `BI += sizeof(BILen)` later?


================
Comment at: llvm/lib/ProfileData/InstrProfWriter.cpp:483-484
+  //    c. uint8_t  Padding (if necessary)
+  uint64_t BinaryIdSectionStart = 0;
+  BinaryIdSectionStart = OS.tell();
+  // Calculate size of binary section.
----------------
NIT: Can we combine these two lines into one?


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