[llvm] [StaticDataLayout][PGO]Implement reader and writer change for data access profiles (PR #139997)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Sat May 17 08:15:52 PDT 2025


================
@@ -390,6 +419,14 @@ Error IndexedMemProfReader::deserializeRadixTreeBased(
       /*Payload=*/Start + RecordPayloadOffset,
       /*Base=*/Start, memprof::RecordLookupTrait(Version, Schema)));
 
+  if (DataAccessProfOffset > RecordTableOffset) {
----------------
teresajohnson wrote:

I don't really follow the benefit of adding the length for this particular section? Not completely against it, but we don't seem to have the length for the other sections. And it isn't clear to me that guarding the deserialization by the length is inherently better than comparing the offsets. I do think that some assertion checking could be added in either case though.

https://github.com/llvm/llvm-project/pull/139997


More information about the llvm-commits mailing list