[PATCH] D54175: [PGO] context sensitive PGO

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 8 09:09:51 PST 2019


davidxl added inline comments.


================
Comment at: include/llvm/ProfileData/InstrProfWriter.h:91
+    // Promote to PF_IRLevelWithCS if WithCS is true;
+    if (ProfileKind == PF_IRLevel && WithCS)
+      ProfileKind = PF_IRLevelWithCS;
----------------
davidxl wrote:
> What is this (promotion)'s use case?
Can you explain the 'promotion' case here (as comments)?


================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:89
+  // This will actually return PSK_Instr or PSK_Sample summary.
+  SummaryMD = M.getProfileSummary(ProfileSummary::PSK_Instr);
   if (!SummaryMD)
----------------
davidxl wrote:
> This is confusing. It is better to just pass 'IsCS' flag to getProfileSummary method.
how about this comment?


================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:497
+
+#if 1
+char PGOInstrumentationGenCreateVarLegacyPass::ID = 0;
----------------
Remove this.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54175/new/

https://reviews.llvm.org/D54175





More information about the llvm-commits mailing list