[llvm] [Profile] Use upper 32 bits of profile version for profile variants. (PR #67695)
David Li via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 11:10:15 PDT 2023
================
@@ -644,15 +644,14 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
(uint64_t)'p' << 40 | (uint64_t)'r' << 32 | (uint64_t)'o' << 24 | \
(uint64_t)'f' << 16 | (uint64_t)'R' << 8 | (uint64_t)129
-/* FIXME: Please remedy the fixme in the header before bumping the version. */
/* Raw profile format version (start from 1). */
#define INSTR_PROF_RAW_VERSION 8
/* Indexed profile format version (start from 1). */
#define INSTR_PROF_INDEX_VERSION 10
/* Coverage mapping format version (start from 0). */
#define INSTR_PROF_COVMAP_VERSION 5
-/* Profile version is always of type uint64_t. Reserve the upper 8 bits in the
+/* Profile version is always of type uint64_t. Reserve the upper 32 bits in the
* version for other variants of profile. We set the lowest bit of the upper 8
----------------
david-xl wrote:
It is clearer to say "we set the 8th most significant bit to ", instead of "the lowest bit of the upper 8 bit".
It is not 'the lowest of upper 32 bit' though -- that would be an incompatible format change.
https://github.com/llvm/llvm-project/pull/67695
More information about the llvm-commits
mailing list