[llvm] Add minimum count threshold for indirect call promotion (PR #145282)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 26 10:39:15 PDT 2025


================
@@ -1,6 +1,10 @@
 ; RUN: opt < %s -passes=pgo-icall-prom -S -icp-total-percent-threshold=50 | FileCheck %s --check-prefix=ICALL-PROM
 ; RUN: opt < %s -passes=pgo-icall-prom -S -pass-remarks=pgo-icall-prom -icp-remaining-percent-threshold=0 -icp-total-percent-threshold=0 -icp-max-prom=4 2>&1 | FileCheck %s --check-prefix=PASS-REMARK
 ; RUN: opt < %s -passes=pgo-icall-prom -S -pass-remarks=pgo-icall-prom -icp-remaining-percent-threshold=0 -icp-total-percent-threshold=20 -icp-max-prom=4 2>&1 | FileCheck %s --check-prefix=PASS2-REMARK
+; Test minimum count threshold - should prevent func1 promotion (count 10 < threshold 15)
+; RUN: opt < %s -passes=pgo-icall-prom -S -pass-remarks=pgo-icall-prom -icp-minimum-count-threshold=15 -icp-remaining-percent-threshold=0 -icp-total-percent-threshold=0 -icp-max-prom=4 2>&1 | FileCheck %s --check-prefix=MIN-COUNT-ALLOW
----------------
teresajohnson wrote:

Nit: The check prefix names for the new invocations are unclear (e.g. ALLOW means allow what?). Maybe just explicitly make them "MIN-COUNT-15" and "MIN-COUNT-10".

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


More information about the llvm-commits mailing list