[PATCH] D81981: [PGO] Supplement PGO profile with Sample profile
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 27 09:22:52 PDT 2020
davidxl added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1234
LLVM_DEBUG(dbgs() << CountFromProfile.size() << " counts\n");
+ AllMinusOnes = (CountFromProfile.size() > 0);
uint64_t ValueSum = 0;
----------------
document the variable.
================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1239
ValueSum += CountFromProfile[I];
+ if (CountFromProfile[I] != (uint64_t)-1)
+ AllMinusOnes = false;
----------------
Is it possible to have some blocks -1?
================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1647
}
+ // When AllMinusOnes is true, it means the profile for the function
+ // is unrepresentative and this function is actually hot. Set the
----------------
oh, just move this comment to the variable decl.
================
Comment at: llvm/test/tools/llvm-profdata/Inputs/mix_instr.proftext:11
+
+goo
+5
----------------
Do we have a test case for all zero case and below the threshold case (considiered all zero)?
================
Comment at: llvm/tools/llvm-profdata/llvm-profdata.cpp:424
+ // above hot threshold.
+ for (size_t I = 0; I < ProfRecord->Counts.size(); ++I)
+ ProfRecord->Counts[I] = -1;
----------------
Is it possible to delete the instprof record for the function from the profile?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81981/new/
https://reviews.llvm.org/D81981
More information about the llvm-commits
mailing list