Currently the machine block placement pass in LLVM uses 80% as the hot branch probability. However, I found that when profile data is available, we can decrease this threshold to get better performance. I modified this threshold into 50%/60%/70%, and use them to measure frontend stalls for SPEC2000 benchmarks. The average number of stalls generally decreases as we use smaller threshold. Below is my experiment results:
Hot branch prob threshold | # of frontend stalls change comparing to when using 80%
50% | +0.6%
60% | -2.2%
70% | -1.8%
Here we can see by using 60% we can get the smallest number of frontend stalls for SPEC2000. Hence in this patch I use 60% as the threshold when profile data is available.