[PATCH] D143162: [AArch64] Add PredictableSelectIsExpensive feature for the Neoverse V1
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 8 11:05:08 PST 2023
dmgreen added a comment.
In D143162#4109736 <https://reviews.llvm.org/D143162#4109736>, @aleksandr.popov wrote:
>> In the end of the day it is performance of the particular heuristics that matters. Do you have performance measurements to share? Are they with the 99% or 75%? Did you plan to change that? And are you running with or without PGO? Thanks.
>
> Yep, we have been running benchmarks on java VM with llvm based JIT compiler. So that SelectOptimize pass relied on the profile information about branches weights.
>
> The most runs with were made on the following benchmarks:
> Scala Benchmark Suite 0.0%
> SPECjvm2008 +2,5%
> We've done a big amount of repeats to ensure that there is no nosie in the results.
>
> During results analysis we've found out that there were cases when it's reasonable to convert select to branch and to get better score on the benchmark, but SelectOptimize pass made a decision not to do that.
> There were 2 approaches to fix that:
>
> - to update SelectOptimize's loop level heuristic;
> - to use another one heuristic on the top of SelectOptimize pass;
>
> The second approach turned out to be simple and effective: we just converted all selects with prediction rate > 75%.
> Anger Fog's rule of thumb for x86 seems to be working fine for AArch64 also (https://discourse.llvm.org/t/rfc-cmov-vs-branch-optimization/6040)
OK Thanks. Just to check:
- This is java
- Has accurate profiling info
- Is using the 75% prediction rate threshold, and this patch? Or just this patch?
I can try an few benchmarks and see how it behaves with PredictableSelectIsExpensive from C, with and without PGO info.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143162/new/
https://reviews.llvm.org/D143162
More information about the llvm-commits
mailing list