summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-08-29 21:19:21 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-08-29 21:19:21 +0000
commitf036f7a1e79910bf5b5b6f37d2e512b4f01155a0 (patch)
treec2767358bf504fd67496b37d8d42e5c3c034b62b /lib/CodeGen/MachineInstr.cpp
parentad7ebc2aebd94ec9e0bd01e1735d06cfe067368b (diff)
downloadllvm-f036f7a1e79910bf5b5b6f37d2e512b4f01155a0.tar.gz
llvm-f036f7a1e79910bf5b5b6f37d2e512b4f01155a0.tar.bz2
llvm-f036f7a1e79910bf5b5b6f37d2e512b4f01155a0.tar.xz
Rename hasVolatileMemoryRef() to hasOrderedMemoryRef().
Ordered memory operations are more constrained than volatile loads and stores because they must be ordered with respect to all other memory operations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 7ff79b3a22..4a4c7217bd 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -1348,7 +1348,7 @@ bool MachineInstr::isSafeToMove(const TargetInstrInfo *TII,
// volatiles, but it is required for atomic loads. It is now allowed to move
// a load across an atomic load with Ordering > Monotonic.
if (mayStore() || isCall() ||
- (mayLoad() && hasVolatileMemoryRef())) {
+ (mayLoad() && hasOrderedMemoryRef())) {
SawStore = true;
return false;
}
@@ -1396,11 +1396,11 @@ bool MachineInstr::isSafeToReMat(const TargetInstrInfo *TII,
return true;
}
-/// hasVolatileMemoryRef - Return true if this instruction may have a
-/// volatile memory reference, or if the information describing the
-/// memory reference is not available. Return false if it is known to
-/// have no volatile memory references.
-bool MachineInstr::hasVolatileMemoryRef() const {
+/// hasOrderedMemoryRef - Return true if this instruction may have an ordered
+/// or volatile memory reference, or if the information describing the memory
+/// reference is not available. Return false if it is known to have no ordered
+/// memory references.
+bool MachineInstr::hasOrderedMemoryRef() const {
// An instruction known never to access memory won't have a volatile access.
if (!mayStore() &&
!mayLoad() &&
@@ -1413,9 +1413,9 @@ bool MachineInstr::hasVolatileMemoryRef() const {
if (memoperands_empty())
return true;
- // Check the memory reference information for volatile references.
+ // Check the memory reference information for ordered references.
for (mmo_iterator I = memoperands_begin(), E = memoperands_end(); I != E; ++I)
- if ((*I)->isVolatile())
+ if (!(*I)->isUnordered())
return true;
return false;