[PATCH] D25048: Tune isHotFunction/isColdFunction

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 29 11:07:57 PDT 2016


Updated the patch to remove the old maxFunctionCount check (will upload the
patch once phabricator is back).

The performance impact is neutral for FDO on speccpu2006:

           Benchmark             Base:Reference   (1)
-------------------------------------------------------
spec/2006/fp/C++/444.namd                 25.44  +0.30%
spec/2006/fp/C++/447.dealII               44.98  +1.68%
spec/2006/fp/C++/450.soplex               43.35  +0.63%
spec/2006/fp/C++/453.povray               38.96  -1.26%
spec/2006/fp/C/433.milc                   23.79  +0.00%
spec/2006/fp/C/470.lbm                    41.47  +0.64%
spec/2006/fp/C/482.sphinx3                47.86  +0.27%
spec/2006/int/C++/471.omnetpp             22.74  -0.88%
spec/2006/int/C++/473.astar               22.69  -0.48%
spec/2006/int/C++/483.xalancbmk           37.91  -1.11%
spec/2006/int/C/400.perlbench             36.28  +0.04%
spec/2006/int/C/401.bzip2                 23.44  +0.23%
spec/2006/int/C/403.gcc                    34.5  +0.07%
spec/2006/int/C/429.mcf                   41.36  +0.65%
spec/2006/int/C/445.gobmk                 27.89  +0.00%
spec/2006/int/C/456.hmmer                 16.37  +0.06%
spec/2006/int/C/458.sjeng                 30.32  +0.15%
spec/2006/int/C/462.libquantum            57.29  +0.12%
spec/2006/int/C/464.h264ref               47.24  -0.19%

geometric mean                                   +0.05%


On Wed, Sep 28, 2016 at 10:08 PM, David Li <davidxl at google.com> wrote:

> 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160929/aa49fe70/attachment.html>


More information about the llvm-commits mailing list