[PATCH] D25048: Tune isHotFunction/isColdFunction

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 22:08:40 PDT 2016


davidxl added inline comments.

================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:80
@@ -80,1 +79,3 @@
+              (uint64_t)(0.3 * (double)Summary->getMaxFunctionCount()) ||
+           isHotCount(FunctionCount.getValue())));
 }
----------------
It is very likely that isHotCount(...) is a superset of the old predicate which means the old predicate is likely to be redundant here.

================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:102
@@ -101,1 +101,3 @@
+              (uint64_t)(0.01 * (double)Summary->getMaxFunctionCount()) ||
+           isColdCount(FunctionCount.getValue())));
 }
----------------
It is likely that isColdCount(..) predicate is a subset of the old predicate -- thus this change likely does  not make any behavior difference. To make the new check effective, Either && should be used or remove the old predicate.


https://reviews.llvm.org/D25048





More information about the llvm-commits mailing list