llvm.org GIT mirror llvm / ad7ebc2
Add MachineMemOperand::isUnordered(). This means the same as LoadInst/StoreInst::isUnordered(), and implies !isVolatile(). Atomic loads and stored are also ordered, and this is the right method to check if it is safe to reorder memory operations. Ordered atomics can't be reordered wrt normal loads and stores, which is a stronger constraint than volatile. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162859 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 8 years ago
1 changed file(s) with 9 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
150150 bool isNonTemporal() const { return Flags & MONonTemporal; }
151151 bool isInvariant() const { return Flags & MOInvariant; }
152152
153 /// isUnordered - Returns true if this memory operation doesn't have any
154 /// ordering constraints other than normal aliasing. Volatile and atomic
155 /// memory operations can't be reordered.
156 ///
157 /// Currently, we don't model the difference between volatile and atomic
158 /// operations. They should retain their ordering relative to all memory
159 /// operations.
160 bool isUnordered() const { return !isVolatile(); }
161
153162 /// refineAlignment - Update this MachineMemOperand to reflect the alignment
154163 /// of MMO, if it has a greater alignment. This must only be used when the
155164 /// new alignment applies to all users of this MachineMemOperand.