[X86] Use the generic AtomicExpandPass instead of X86AtomicExpandPass
authorRobin Morisset <morisset@google.com>
Wed, 17 Sep 2014 00:06:58 +0000 (00:06 +0000)
committerRobin Morisset <morisset@google.com>
Wed, 17 Sep 2014 00:06:58 +0000 (00:06 +0000)
commit5c16c4e45a9559e487a0055dd5a98cce360b49f7
tree0cff72bd91600faeb71afd23f18b293df141168d
parent9fe79b48b835eae223716623880313d08101cc28
[X86] Use the generic AtomicExpandPass instead of X86AtomicExpandPass

This required a new hook called hasLoadLinkedStoreConditional to know whether
to expand atomics to LL/SC (ARM, AArch64, in a future patch Power) or to
CmpXchg (X86).

Apart from that, the new code in AtomicExpandPass is mostly moved from
X86AtomicExpandPass. The main result of this patch is to get rid of that
pass, which had lots of code duplicated with AtomicExpandPass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217928 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
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/X86/CMakeLists.txt
lib/Target/X86/X86.h
lib/Target/X86/X86AtomicExpandPass.cpp [deleted file]
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86TargetMachine.cpp