From: Konstantin Zhuravlyov Date: Fri, 21 Oct 2016 16:02:35 +0000 (+0000) Subject: [MachineMemOperand][AtomicSDNode] Remove getSuccessOrdering() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=466e9f4bea1cf6966ef04ee1e676bd5ae67d476b;p=llvm [MachineMemOperand][AtomicSDNode] Remove getSuccessOrdering() Differential Revision: https://reviews.llvm.org/D25786 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284834 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/MachineMemOperand.h b/include/llvm/CodeGen/MachineMemOperand.h index a7ffdc07026..a311124a35b 100644 --- a/include/llvm/CodeGen/MachineMemOperand.h +++ b/include/llvm/CodeGen/MachineMemOperand.h @@ -202,17 +202,13 @@ public: return static_cast(AtomicInfo.SynchScope); } - /// Return the atomic ordering requirements for this memory operation. + /// Return the atomic ordering requirements for this memory operation. For + /// cmpxchg atomic operations, return the atomic ordering requirements when + /// store occurs. AtomicOrdering getOrdering() const { return static_cast(AtomicInfo.Ordering); } - /// For cmpxchg atomic operations, return the atomic ordering requirements - /// when store occurs. - AtomicOrdering getSuccessOrdering() const { - return getOrdering(); - } - /// For cmpxchg atomic operations, return the atomic ordering requirements /// when store does not occur. AtomicOrdering getFailureOrdering() const { diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index fa4fc4d9bb3..46805a96060 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -1123,7 +1123,9 @@ public: /// Return the synchronization scope for this memory operation. SynchronizationScope getSynchScope() const { return MMO->getSynchScope(); } - /// Return the atomic ordering requirements for this memory operation. + /// Return the atomic ordering requirements for this memory operation. For + /// cmpxchg atomic operations, return the atomic ordering requirements when + /// store occurs. AtomicOrdering getOrdering() const { return MMO->getOrdering(); } /// Return the type of the in-memory value. @@ -1204,13 +1206,6 @@ public: Op == ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS; } - /// For cmpxchg atomic operations, return the atomic ordering requirements - /// when store occurs. - AtomicOrdering getSuccessOrdering() const { - assert(isCompareAndSwap() && "Must be cmpxchg operation"); - return MMO->getSuccessOrdering(); - } - /// For cmpxchg atomic operations, return the atomic ordering requirements /// when store does not occur. AtomicOrdering getFailureOrdering() const {