mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-03 19:02:35 +00:00
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. llvm-svn: 162859
This commit is contained in:
parent
e4bed701f9
commit
0841c7b2e7
@ -151,6 +151,15 @@ public:
|
||||
bool isNonTemporal() const { return Flags & MONonTemporal; }
|
||||
bool isInvariant() const { return Flags & MOInvariant; }
|
||||
|
||||
/// isUnordered - Returns true if this memory operation doesn't have any
|
||||
/// ordering constraints other than normal aliasing. Volatile and atomic
|
||||
/// memory operations can't be reordered.
|
||||
///
|
||||
/// Currently, we don't model the difference between volatile and atomic
|
||||
/// operations. They should retain their ordering relative to all memory
|
||||
/// operations.
|
||||
bool isUnordered() const { return !isVolatile(); }
|
||||
|
||||
/// refineAlignment - Update this MachineMemOperand to reflect the alignment
|
||||
/// of MMO, if it has a greater alignment. This must only be used when the
|
||||
/// new alignment applies to all users of this MachineMemOperand.
|
||||
|
Loading…
x
Reference in New Issue
Block a user