[AArch64] Out-of-line atomics (-moutline-atomics) implementation.
authorPavel Iliin <Pavel.Iliin@arm.com>
Thu, 19 Nov 2020 19:52:46 +0000 (19:52 +0000)
committerPavel Iliin <Pavel.Iliin@arm.com>
Fri, 20 Nov 2020 13:30:12 +0000 (13:30 +0000)
commit4d7df43ffdb460dddb2877a886f75f45c3fee188
treee49c230a3c04869ae0b3c942d6e67cf64bb0ab36
parent1285781fc5a42ad4712ac4866a219c40e3c3d860
[AArch64] Out-of-line atomics (-moutline-atomics) implementation.

This patch implements out of line atomics for LSE deployment
mechanism. Details how it works can be found in llvm/docs/Atomics.rst
Options -moutline-atomics and -mno-outline-atomics to enable and disable it
were added to clang driver. This is clang and llvm part of out-of-line atomics
interface, library part is already supported by libgcc. Compiler-rt
support is provided in separate patch.

Differential Revision: https://reviews.llvm.org/D91157
22 files changed:
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Clang.cpp
llvm/docs/Atomics.rst
llvm/include/llvm/CodeGen/RuntimeLibcalls.h
llvm/include/llvm/IR/RuntimeLibcalls.def
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/TargetLoweringBase.cpp
llvm/lib/Target/AArch64/AArch64.td
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64Subtarget.h
llvm/test/CodeGen/AArch64/arm64-atomic-128.ll
llvm/test/CodeGen/AArch64/arm64-atomic.ll
llvm/test/CodeGen/AArch64/arm64_32-atomics.ll
llvm/test/CodeGen/AArch64/atomic-ops-lse.ll
llvm/test/CodeGen/AArch64/atomic-ops-not-barriers.ll
llvm/test/CodeGen/AArch64/atomic-ops.ll
llvm/test/CodeGen/AArch64/cmpxchg-O0.ll
llvm/test/CodeGen/AArch64/cmpxchg-idioms.ll
llvm/test/CodeGen/AArch64/cmpxchg-lse-even-regs.ll
llvm/test/Transforms/AtomicExpand/AArch64/expand-atomicrmw-xchg-fp.ll