[llvm] [ICP] Add a few tunings to indirect-call-promotion (PR #149892)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 21 13:50:29 PDT 2025


================
@@ -121,8 +121,18 @@ void ProfileSummaryInfo::computeThresholds() {
       ProfileSummaryBuilder::getHotCountThreshold(DetailedSummary);
   ColdCountThreshold =
       ProfileSummaryBuilder::getColdCountThreshold(DetailedSummary);
-  assert(ColdCountThreshold <= HotCountThreshold &&
-         "Cold count threshold cannot exceed hot count threshold!");
+  // When the hot and cold thresholds are identical, we would classify
+  // a count value as both hot and cold since we are doing an inclusitve check
+  // (see ::is{Hot|Cold}Count(). To avoid this undesirable overlap, ensure the
+  // thresholds are distinct.
+  if (HotCountThreshold == ColdCountThreshold) {
+    if (ColdCountThreshold > 0)
----------------
xur-llvm wrote:

Probably not a good idea as this will lead tons of test changes. Also change existing opt behaviors.

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


More information about the llvm-commits mailing list