This patch is a split of D83024 (https://reviews.llvm.org/D83024)
It includes all the supporting code without flipping the default behavior.
It adds a variant bit in the profile version, adds new directives in text profile format, and changes llvm-profdata tool accrodingly.
Many test changes from D83024 are also included. This should be OK as I explicitly specify the options.
This revision is closed, so excuse me for the question:
Files ./llvm/include/llvm/ProfileData/InstrProfData.inc and ./compiler-rt/include/profile/InstrProfData.inc should be two identical copies, as stated in their description.
Should we add VARIANT_MASK_INSTR_ENTRY to compiler-rt or change description?