[CodeGen] Refactor TLI/AtomicExpand interface to make LLSC explicit.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Fri, 11 Sep 2015 17:08:28 +0000 (17:08 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Fri, 11 Sep 2015 17:08:28 +0000 (17:08 +0000)
commit74869be2733581245a0e645087b9a55f13e0fec9
treea0a7e06db42c400f428986112a646214ee25be46
parentf3d2de3832a1ca028869ac614df32a9698fc6535
[CodeGen] Refactor TLI/AtomicExpand interface to make LLSC explicit.

We used to have this magic "hasLoadLinkedStoreConditional()" callback,
which really meant two things:
- expand cmpxchg (to ll/sc).
- expand atomic loads using ll/sc (rather than cmpxchg).

Remove it, and, instead, introduce explicit callbacks:
- bool shouldExpandAtomicCmpXchgInIR(inst)
- AtomicExpansionKind shouldExpandAtomicLoadInIR(inst)

Differential Revision: http://reviews.llvm.org/D12557

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247429 91177308-0d34-0410-b5e6-96231b3b80d8
docs/Atomics.rst
include/llvm/Target/TargetLowering.h
lib/CodeGen/AtomicExpandPass.cpp
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/AArch64/AArch64ISelLowering.h
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h
lib/Target/Hexagon/HexagonISelLowering.cpp
lib/Target/Hexagon/HexagonISelLowering.h
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h