If target cpu is pwr8+, we can generate inlined quadword lock free atomic operations, thus no need to generate libcalls into libatomic.
Details
- Reviewers
nemanjai jsji xingxue hubert.reinterpretcast cebowleratibm jfb - Group Reviewers
Restricted Project
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
2,530 ms | x64 debian > AddressSanitizer-x86_64-linux.TestCases::strcmp.c |
Event Timeline
clang/lib/Basic/Targets/PPC.cpp | ||
---|---|---|
336 |
Instructions needed for inline quadword atomics like lqarx and stqcx are only user-space viable in pwr8 and above. However, pwr6 and pwr7 also feature ppc64. |
clang/test/CodeGen/ppc64-quadword-atomics.c | ||
---|---|---|
11 | Can you add a link to something that demonstrates that the implementation of __atomic_exchange is also lock-free when running on pwr8 and up? |
clang/test/CodeGen/ppc64-quadword-atomics.c | ||
---|---|---|
11 | https://reviews.llvm.org/D103614#C2646926NL5 All related lock-free codegen is in the parent revision. |
clang/test/CodeGen/ppc64-quadword-atomics.c | ||
---|---|---|
11 | That change is for the compiler. I am looking for something that makes the libatomic implementation correspondingly lock-free for this type (even if libatomic needs to be deployable on pwr7). |
We don't need this at all for Linux?