[compiler-rt] [llvm] [InstrFDO]Allow indexed profile reader to parse compatible future versions and returns errors for incompatible ones. (PR #88212)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 13:29:31 PDT 2024


================
@@ -1200,6 +1213,22 @@ struct Header {
   uint64_t BinaryIdOffset = 0;
   uint64_t TemporalProfTracesOffset = 0;
   uint64_t VTableNamesOffset = 0;
+  // Records the on-disk byte size of the header.
+  uint64_t HeaderByteSize = 0;
+  // Indexed profile writer should record the minimum profile reader version
+  // required to parse this profile. If a profile reader's newest known version
+  // is smaller than what's recorded in this field, the profile reader will stop
+  // parsing profiles and throw error.
----------------
kazutakahirata wrote:

I think a variable should be described with a noun or noun phrase:

```suggestion
  // The minimum profile version that the profile requires the reader to be able
  // to parse. If a profile reader's newest known version
  // is smaller than what's recorded in this field, the profile reader will stop
  // parsing profiles and throw error.
```


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


More information about the llvm-commits mailing list