[llvm] r257224 - [PGO] Introducing version mask macro/NFC
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 8 14:55:16 PST 2016
Author: davidxl
Date: Fri Jan 8 16:55:16 2016
New Revision: 257224
URL: http://llvm.org/viewvc/llvm-project?rev=257224&view=rev
Log:
[PGO] Introducing version mask macro/NFC
Modified:
llvm/trunk/include/llvm/ProfileData/InstrProfData.inc
Modified: llvm/trunk/include/llvm/ProfileData/InstrProfData.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/InstrProfData.inc?rev=257224&r1=257223&r2=257224&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ProfileData/InstrProfData.inc (original)
+++ llvm/trunk/include/llvm/ProfileData/InstrProfData.inc Fri Jan 8 16:55:16 2016
@@ -700,6 +700,14 @@ serializeValueProfDataFromRT(const Value
#define INSTR_PROF_INDEX_VERSION 3
#define INSTR_PROF_COVMAP_VERSION 0
+/* Profile version is always of type uint_64_t. Reserve the upper 8 bits in the
+ * version for other variants of profile. We set the lowest bit of the upper 8
+ * bits (i.e. bit 56) to 1 to indicate if this is an IR-level instrumentaiton
+ * generated profile, and 0 if this is a Clang FE generated profile.
+*/
+#define VARIANT_MASKS_ALL 0xff00000000000000ULL
+#define GET_VERSION(V) ((V) & ~VARIANT_MASKS_ALL)
+
/* Runtime section names and name strings. */
#define INSTR_PROF_DATA_SECT_NAME __llvm_prf_data
#define INSTR_PROF_NAME_SECT_NAME __llvm_prf_names
More information about the llvm-commits
mailing list