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

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 21:30:36 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.
----------------
dcci wrote:

changed.

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


More information about the llvm-commits mailing list