[llvm] [PGO] Skip optimizing probes that don't fit. (PR #70875)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 21:25:14 PDT 2023


================
@@ -221,12 +222,26 @@ void SampleProfileProber::computeProbeIdForBlocks() {
 }
 
 void SampleProfileProber::computeProbeIdForCallsites() {
+  LLVMContext &Ctx = F->getContext();
+  Module *M = F->getParent();
+
   for (auto &BB : *F) {
     for (auto &I : BB) {
       if (!isa<CallBase>(I))
         continue;
       if (isa<IntrinsicInst>(&I))
         continue;
+
+      // There's a limit on the number of probe indices that can be optimized.
----------------
WenleiHe wrote:

nit: remove the firs sentence in the comment, as the 2nd sentence should be sufficient. "that can be optimized" in particular is a bit unclear. 

https://github.com/llvm/llvm-project/pull/70875


More information about the llvm-commits mailing list