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)
commit277066ab432e4214ec64ec636a09f6b0af04186d
treeaf190e663640b37ae8aefd54be13ff9deee18e01
parent3ed22c4d4ed84fa1965ce9836e787dc216ea03d5
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

llvm-svn: 212119
21 files changed:
llvm/lib/Target/X86/CMakeLists.txt
llvm/lib/Target/X86/X86.h
llvm/lib/Target/X86/X86AtomicExpandPass.cpp [new file with mode: 0644]
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.h
llvm/lib/Target/X86/X86InstrCompiler.td
llvm/lib/Target/X86/X86InstrInfo.td
llvm/lib/Target/X86/X86TargetMachine.cpp
llvm/test/CodeGen/X86/2010-01-08-Atomic64Bug.ll
llvm/test/CodeGen/X86/Atomics-64.ll
llvm/test/CodeGen/X86/atomic-load-store-wide.ll
llvm/test/CodeGen/X86/atomic-minmax-i6432.ll
llvm/test/CodeGen/X86/atomic128.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/atomic16.ll
llvm/test/CodeGen/X86/atomic32.ll
llvm/test/CodeGen/X86/atomic64.ll
llvm/test/CodeGen/X86/atomic6432.ll
llvm/test/CodeGen/X86/atomic8.ll
llvm/test/CodeGen/X86/atomic_op.ll
llvm/test/CodeGen/X86/pr5145.ll