summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/CodeGen/MachineMemOperand.h10
-rw-r--r--llvm/include/llvm/CodeGen/SelectionDAGNodes.h11
2 files changed, 6 insertions, 15 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineMemOperand.h b/llvm/include/llvm/CodeGen/MachineMemOperand.h
index a7ffdc07026..a311124a35b 100644
--- a/llvm/include/llvm/CodeGen/MachineMemOperand.h
+++ b/llvm/include/llvm/CodeGen/MachineMemOperand.h
@@ -202,18 +202,14 @@ public:
return static_cast<SynchronizationScope>(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<AtomicOrdering>(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 {
return static_cast<AtomicOrdering>(AtomicInfo.FailureOrdering);
diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
index fa4fc4d9bb3..46805a96060 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/llvm/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.
@@ -1205,13 +1207,6 @@ public:
}
/// 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 {
assert(isCompareAndSwap() && "Must be cmpxchg operation");
OpenPOWER on IntegriCloud