[PATCH] D118020: [RISCV] Set CostPerUse for floating point registers
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 4 18:42:54 PST 2022
craig.topper added a comment.
Herald added a project: All.
In D118020#3344580 <https://reviews.llvm.org/D118020#3344580>, @pcwang-thead wrote:
> Results of running SPEC2006 FP with upstream Clang/LLVM (based on 8ad6d5e465bba198c883e699c28690b0ea79400d <https://reviews.llvm.org/rG8ad6d5e465bba198c883e699c28690b0ea79400d>) and options are `-march=rv64imafdc -mabi=lp64d` without micro-arch specific scheduling.
> All benchmarks ran 10 times and we compared the arithmetic average run times.
>
> 1. Set `CostPerUse` to 1:
>
> | Benchmark | Performance |
> | ----------- | ----------- |
> | 447.dealII | +2.087% |
> | 453.povray | +1.354% |
> | 450.soplex | +0.8854% |
> | 482.sphinx3 | +0.8112% |
> | 433.milc | +0.743% |
> | 470.lbm | +0.1381% |
> | 444.namd | -0.714% |
> |
>
> Geometric mean: +0.7544%
>
> 2. Allocate argument floating-point register first:
>
> | Benchmark | Performance |
> | ----------- | ----------- |
> | 453.povray | +1.866% |
> | 450.soplex | +0.6809% |
> | 447.dealII | +0.1095% |
> | 433.milc | -0.01403% |
> | 444.namd | -0.1019% |
> | 470.lbm | -0.4855% |
> | 482.sphinx3 | -0.6987% |
> |
>
> Geometric mean: +0.1906%
>
> 3. Both `1` and `2`:
>
> | Benchmark | Performance |
> | ----------- | ----------- |
> | 482.sphinx3 | +1.006% |
> | 433.milc | +0.9639% |
> | 450.soplex | +0.88% |
> | 453.povray | +0.6788% |
> | 447.dealII | +0.04175% |
> | 470.lbm | -0.118% |
> | 444.namd | -0.4662% |
> |
>
> Geometric mean: +0.425%
>
> All of them have code size reductions.
>
> @craig.topper @asb
What optimization level was this? Was fast-math enabled?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118020/new/
https://reviews.llvm.org/D118020
More information about the llvm-commits
mailing list