[PATCH] D13033: [AArch64/ARM] Emit clrex in the ll/sc-expanded cmpxchg no-store path.
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 14:52:19 PDT 2015
ab created this revision.
ab added reviewers: t.p.northover, jmolloy.
ab added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.
In the comparison failure path of a cmpxchg expansion, the initial
ldrex/ldxr will not be followed by a matching strex/stxr.
On ARM/AArch64, this unnecessarily ties up the execution monitor,
which might have a negative performance impact on some uarchs.
Instead, release the monitor in the failure block.
The clrex instruction was designed for this: use it.
Also see ARMARM v8-A B2.10.2:
"Exclusive access instructions and Shareable memory locations".
http://reviews.llvm.org/D13033
Files:
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
test/CodeGen/AArch64/arm64-atomic.ll
test/CodeGen/AArch64/atomic-ops.ll
test/CodeGen/ARM/atomic-cmp.ll
test/CodeGen/ARM/atomic-cmpxchg.ll
test/CodeGen/ARM/atomic-op.ll
test/CodeGen/ARM/atomic-ops-v8.ll
test/CodeGen/ARM/cmpxchg-weak.ll
test/Transforms/AtomicExpand/ARM/atomic-expansion-v7.ll
test/Transforms/AtomicExpand/ARM/atomic-expansion-v8.ll
test/Transforms/AtomicExpand/ARM/cmpxchg-weak.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13033.35311.patch
Type: text/x-patch
Size: 35954 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150921/71ac2def/attachment.bin>
More information about the llvm-commits
mailing list