aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index eab74bd301..42709012d2 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -58,8 +58,10 @@ public:
NoFlags = 0,
FrameSetup = 1 << 0, // Instruction is used as a part of
// function frame setup code.
- InsideBundle = 1 << 1 // Instruction is inside a bundle (not
+ InsideBundle = 1 << 1, // Instruction is inside a bundle (not
// the first MI in a bundle)
+ MayLoad = 1 << 2, // Instruction could possibly read memory.
+ MayStore = 1 << 3 // Instruction could possibly modify memory.
};
private:
const MCInstrDesc *MCID; // Instruction descriptor.
@@ -445,7 +447,7 @@ public:
/// Instructions with this flag set are not necessarily simple load
/// instructions, they may load a value and modify it, for example.
bool mayLoad(QueryType Type = AnyInBundle) const {
- return hasProperty(MCID::MayLoad, Type);
+ return hasProperty(MCID::MayLoad, Type) || (Flags & MayLoad);
}
@@ -454,7 +456,7 @@ public:
/// instructions, they may store a modified value based on their operands, or
/// may not actually modify anything, for example.
bool mayStore(QueryType Type = AnyInBundle) const {
- return hasProperty(MCID::MayStore, Type);
+ return hasProperty(MCID::MayStore, Type) || (Flags & MayStore);
}
//===--------------------------------------------------------------------===//