summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2015-05-21 21:00:30 +0000
committerChad Rosier <mcrosier@codeaurora.org>2015-05-21 21:00:30 +0000
commit6a902f9d036266abd7963ee60bcd1c2187110f80 (patch)
treecec7e2c5ce8184dfafca83ad16c62df6b4d289d7 /llvm
parentc37baf82a92ab6c1359a137862734c3dfe129472 (diff)
downloadbcm5719-llvm-6a902f9d036266abd7963ee60bcd1c2187110f80.tar.gz
bcm5719-llvm-6a902f9d036266abd7963ee60bcd1c2187110f80.zip
[MachineInstr] Add mayLoadOrStore API. NFC.
llvm-svn: 237955
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/CodeGen/MachineInstr.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h
index c5f11c31b2b..e57257c76bc 100644
--- a/llvm/include/llvm/CodeGen/MachineInstr.h
+++ b/llvm/include/llvm/CodeGen/MachineInstr.h
@@ -560,7 +560,6 @@ public:
return hasProperty(MCID::MayLoad, Type);
}
-
/// Return true if this instruction could possibly modify memory.
/// Instructions with this flag set are not necessarily simple store
/// instructions, they may store a modified value based on their operands, or
@@ -574,6 +573,11 @@ public:
return hasProperty(MCID::MayStore, Type);
}
+ /// Return true if this instruction could possibly read or modify memory.
+ bool mayLoadOrStore(QueryType Type = AnyInBundle) const {
+ return mayLoad(Type) || mayStore(Type);
+ }
+
//===--------------------------------------------------------------------===//
// Flags that indicate whether an instruction can be modified by a method.
//===--------------------------------------------------------------------===//
OpenPOWER on IntegriCloud