How to add a new mode to llvm raw profile version?

https://github.com/llvm/llvm-project/blob/53a2923bf67bc164558d489493176630123abf7e/llvm/include/llvm/ProfileData/InstrProfData.inc#L668-L675 shows that all upper 8 bits are already used for various configurations. If I want to add a new mode, how can the new mode be detected at runtime?

These bits are reserved in the version field which is of type uint64_t. I’m doubtful that we’re ever going to need 56-bits for version as we’re currently on version 8, so I’d suggest reserving more bits for flags. We could also consider splitting the version field into two fields of type uint32_t, the first one for flags and the second one for version.