[SDAG] Minor code cleanup/standardization of atomic accessors [NFC]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369057 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Philip Reames
2019-08-15 22:21:14 +00:00
parent 72195b9ba8
commit afeb7897d5
3 changed files with 11 additions and 3 deletions
+8
View File
@@ -1351,6 +1351,14 @@ public:
/// store occurs.
AtomicOrdering getOrdering() const { return MMO->getOrdering(); }
/// Return true if the memory operation ordering is Unordered or higher.
bool isAtomic() const { return MMO->isAtomic(); }
/// Returns true if the memory operation doesn't imply any ordering
/// constraints on surrounding memory operations beyond the normal memory
/// aliasing rules.
bool isUnordered() const { return MMO->isUnordered(); }
/// Return the type of the in-memory value.
EVT getMemoryVT() const { return MemoryVT; }
@@ -1237,7 +1237,7 @@ bool AArch64InstructionSelector::earlySelectLoad(
// Don't handle atomic loads/stores yet.
auto &MemOp = **I.memoperands_begin();
if (MemOp.getOrdering() != AtomicOrdering::NotAtomic) {
if (MemOp.isAtomic()) {
LLVM_DEBUG(dbgs() << "Atomic load/store not supported yet\n");
return false;
}
@@ -1739,7 +1739,7 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
}
auto &MemOp = **I.memoperands_begin();
if (MemOp.getOrdering() != AtomicOrdering::NotAtomic) {
if (MemOp.isAtomic()) {
// For now we just support s8 acquire loads to be able to compile stack
// protector code.
if (MemOp.getOrdering() == AtomicOrdering::Acquire &&
+1 -1
View File
@@ -1076,7 +1076,7 @@ bool ARMInstructionSelector::select(MachineInstr &I) {
case G_STORE:
case G_LOAD: {
const auto &MemOp = **I.memoperands_begin();
if (MemOp.getOrdering() != AtomicOrdering::NotAtomic) {
if (MemOp.isAtomic()) {
LLVM_DEBUG(dbgs() << "Atomic load/store not supported yet\n");
return false;
}