[llvm] r237955 - [MachineInstr] Add mayLoadOrStore API. NFC.
Chad Rosier
mcrosier at codeaurora.org
Thu May 21 14:00:30 PDT 2015
Author: mcrosier
Date: Thu May 21 16:00:30 2015
New Revision: 237955
URL: http://llvm.org/viewvc/llvm-project?rev=237955&view=rev
Log:
[MachineInstr] Add mayLoadOrStore API. NFC.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineInstr.h
Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=237955&r1=237954&r2=237955&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Thu May 21 16:00:30 2015
@@ -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.
//===--------------------------------------------------------------------===//
More information about the llvm-commits
mailing list