X86: expand atomics in IR instead of as MachineInstrs.
authorTim Northover <tnorthover@apple.com>
Tue, 1 Jul 2014 18:53:31 +0000 (18:53 +0000)
committerTim Northover <tnorthover@apple.com>
Tue, 1 Jul 2014 18:53:31 +0000 (18:53 +0000)
commit5c8b83eb7a7b5f157f59945478434d0e5fa60056
tree4e5bba0366f2e81476352652fecca16d8ab0f13d
parenta454a5d05b8a3a0d5a6b0876d8fa1d5b9ce354b6
X86: expand atomics in IR instead of as MachineInstrs.

The logic for expanding atomics that aren't natively supported in
terms of cmpxchg loops is much simpler to express at the IR level. It
also allows the normal optimisations and CodeGen improvements to help
out with atomics, instead of using a limited set of possible
instructions..

rdar://problem/13496295

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212119 91177308-0d34-0410-b5e6-96231b3b80d8
21 files changed:
lib/Target/X86/CMakeLists.txt
lib/Target/X86/X86.h
lib/Target/X86/X86AtomicExpandPass.cpp [new file with mode: 0644]
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86InstrCompiler.td
lib/Target/X86/X86InstrInfo.td
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/X86/2010-01-08-Atomic64Bug.ll
test/CodeGen/X86/Atomics-64.ll
test/CodeGen/X86/atomic-load-store-wide.ll
test/CodeGen/X86/atomic-minmax-i6432.ll
test/CodeGen/X86/atomic128.ll [new file with mode: 0644]
test/CodeGen/X86/atomic16.ll
test/CodeGen/X86/atomic32.ll
test/CodeGen/X86/atomic64.ll
test/CodeGen/X86/atomic6432.ll
test/CodeGen/X86/atomic8.ll
test/CodeGen/X86/atomic_op.ll
test/CodeGen/X86/pr5145.ll