[PATCH] D91156: [AArch64] Compiler-rt interface for out-of-line atomics.
Sebastian Pop via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 16 22:15:53 PST 2020
sebpop added a comment.
I tested this change on Graviton2 aarch64-linux with `clang -moutline-atomics`.
clang was configured with compiler-rt:
cmake -v -G Ninja \
-DCLANG_DEFAULT_RTLIB:STRING=compiler-rt \
-DLLVM_ENABLE_PROJECTS:STRING="clang;compiler-rt;libunwind" \
-DCLANG_DEFAULT_UNWINDLIB:STRING=libunwind \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_PREFIX:PATH=/home/ubuntu/llvm/usr/ \
../llvm
I built and tested https://github.com/xianyi/OpenBLAS and https://github.com/boostorg/boost.git and there are no new fails.
I also tested the micro-benchmark as described in https://reviews.llvm.org/D91157
+ export LD_LIBRARY_PATH=/home/ubuntu/llvm/usr/lib
+ LD_LIBRARY_PATH=/home/ubuntu/llvm/usr/lib
+ /home/ubuntu/llvm/usr/bin/clang++ -o clang-generic-v8 a.cc -std=c++11 -O2 -isystem benchmark/include -Lbenchmark/build/src -lbenchmark -lpthread
+ ./clang-generic-v8
2020-12-16 23:22:45
Running ./clang-generic-v8
Run on (64 X 243.75 MHz CPU s)
CPU Caches:
L1 Data 64 KiB (x64)
L1 Instruction 64 KiB (x64)
L2 Unified 1024 KiB (x64)
L3 Unified 32768 KiB (x1)
Load Average: 0.33, 2.58, 7.68
***WARNING*** Library was built as DEBUG. Timings may be affected.
-------------------------------------------------------------------------
Benchmark Time CPU Iterations
-------------------------------------------------------------------------
BM_atomic_increment 9.21 ns 9.21 ns 76001652
BM_atomic_fetch_add 9.21 ns 9.21 ns 76021489
BM_atomic_compare_exchange 7.61 ns 7.61 ns 92024848
BM_std_atomic_compare_exchange 12.4 ns 12.4 ns 56402874
+ /home/ubuntu/llvm/usr/bin/clang++ -o clang-lse -march=armv8-a+lse a.cc -std=c++11 -O2 -isystem benchmark/include -Lbenchmark/build/src -lbenchmark -lpthread
+ ./clang-lse
2020-12-16 23:22:49
Running ./clang-lse
Run on (64 X 243.75 MHz CPU s)
CPU Caches:
L1 Data 64 KiB (x64)
L1 Instruction 64 KiB (x64)
L2 Unified 1024 KiB (x64)
L3 Unified 32768 KiB (x1)
Load Average: 0.38, 2.55, 7.64
***WARNING*** Library was built as DEBUG. Timings may be affected.
-------------------------------------------------------------------------
Benchmark Time CPU Iterations
-------------------------------------------------------------------------
BM_atomic_increment 7.21 ns 7.21 ns 97070064
BM_atomic_fetch_add 7.21 ns 7.21 ns 97124037
BM_atomic_compare_exchange 7.21 ns 7.21 ns 97134576
BM_std_atomic_compare_exchange 11.8 ns 11.8 ns 59414449
+ /home/ubuntu/llvm/usr/bin/clang++ -o clang-moutline -moutline-atomics a.cc -std=c++11 -O2 -isystem benchmark/include -Lbenchmark/build/src -lbenchmark -lpthread
+ ./clang-moutline
2020-12-16 23:22:52
Running ./clang-moutline
Run on (64 X 243.75 MHz CPU s)
CPU Caches:
L1 Data 64 KiB (x64)
L1 Instruction 64 KiB (x64)
L2 Unified 1024 KiB (x64)
L3 Unified 32768 KiB (x1)
Load Average: 0.38, 2.55, 7.64
***WARNING*** Library was built as DEBUG. Timings may be affected.
-------------------------------------------------------------------------
Benchmark Time CPU Iterations
-------------------------------------------------------------------------
BM_atomic_increment 7.21 ns 7.21 ns 97090953
BM_atomic_fetch_add 7.21 ns 7.21 ns 97136432
BM_atomic_compare_exchange 7.21 ns 7.21 ns 97132760
BM_std_atomic_compare_exchange 11.6 ns 11.6 ns 60292533
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91156/new/
https://reviews.llvm.org/D91156
More information about the llvm-commits
mailing list