[PATCH] D15540: [PGO] differentiate FE instrumentation and IR level instrumentation profiles

David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 13:13:45 PST 2016


davidxl added a comment.

After this patch is done, the FE also needs to be changed to recognize IR profile and do the right handling.


================
Comment at: include/llvm/ProfileData/InstrProfData.inc:710
@@ -709,1 +709,3 @@
 #define GET_VERSION(V) ((V) & ~VARIANT_MASKS_ALL)
+#define VARIANT_MASK_IR_PROF (0x1ULL << 56)
+#define IR_LEVEL_PROF_VERSION_VAR __llvm_profile_raw_version
----------------
Please rebase the patch. This part is already in tree.

================
Comment at: include/llvm/ProfileData/InstrProfReader.h:162
@@ -156,1 +161,3 @@
   bool ShouldSwapBytes;
+  // Version of the raw profile. It contains the variant profile information.
+  uint64_t Version;
----------------
Change the comments to:

The value of the version field of the raw profile data header.  The lower 56 bits specifies the format version and the most significant 8 bits specify the variant types of the profile. 

================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:723
@@ +722,3 @@
+    Ctx.diagnose(DiagnosticInfoPGOProfile(
+        ProfileFileName.data(), "Not an IR level instrumentation profile"));
+    return false;
----------------
This warning message needs to be revisited later once the clang option is finalized. Please add a TODO here.


http://reviews.llvm.org/D15540





More information about the llvm-commits mailing list