diff options
| author | Chad Rosier <mcrosier@codeaurora.org> | 2015-05-21 21:00:30 +0000 | 
|---|---|---|
| committer | Chad Rosier <mcrosier@codeaurora.org> | 2015-05-21 21:00:30 +0000 | 
| commit | 6a902f9d036266abd7963ee60bcd1c2187110f80 (patch) | |
| tree | cec7e2c5ce8184dfafca83ad16c62df6b4d289d7 | |
| parent | c37baf82a92ab6c1359a137862734c3dfe129472 (diff) | |
| download | bcm5719-llvm-6a902f9d036266abd7963ee60bcd1c2187110f80.tar.gz bcm5719-llvm-6a902f9d036266abd7963ee60bcd1c2187110f80.zip  | |
[MachineInstr] Add mayLoadOrStore API. NFC.
llvm-svn: 237955
| -rw-r--r-- | llvm/include/llvm/CodeGen/MachineInstr.h | 6 | 
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.    //===--------------------------------------------------------------------===//  | 

