mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
[Power] Use AtomicExpandPass for fence insertion, and use lwsync where appropriate
Summary: This patch makes use of AtomicExpandPass in Power for inserting fences around atomic as part of an effort to remove fence insertion from SelectionDAGBuilder. As a big bonus, it lets us use sync 1 (lightweight sync, often used by the mnemonic lwsync) instead of sync 0 (heavyweight sync) in many cases. I also added a test, as there was no test for the barriers emitted by the Power backend for atomic loads and stores. Test Plan: new test + make check-all Reviewers: jfb Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5180 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218331 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -28,8 +28,10 @@ let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.".
|
||||
def int_ppc_dcbz : Intrinsic<[], [llvm_ptr_ty], []>;
|
||||
def int_ppc_dcbzl : Intrinsic<[], [llvm_ptr_ty], []>;
|
||||
|
||||
// sync instruction
|
||||
// sync instruction (i.e. sync 0, a.k.a hwsync)
|
||||
def int_ppc_sync : Intrinsic<[], [], []>;
|
||||
// lwsync is sync 1
|
||||
def int_ppc_lwsync : Intrinsic<[], [], []>;
|
||||
|
||||
// Intrinsics used to generate ctr-based loops. These should only be
|
||||
// generated by the PowerPC backend!
|
||||
|
||||
Reference in New Issue
Block a user