From 466e9f4bea1cf6966ef04ee1e676bd5ae67d476b Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Fri, 21 Oct 2016 16:02:35 +0000 Subject: [PATCH] [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 --- include/llvm/CodeGen/MachineMemOperand.h | 10 +++------- include/llvm/CodeGen/SelectionDAGNodes.h | 11 +++-------- 2 files changed, 6 insertions(+), 15 deletions(-) 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 { -- 2.49.0