summaryrefslogtreecommitdiff
path: root/include/llvm/Instruction.h
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-07-27 00:46:46 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-07-27 00:46:46 +0000
commit6f3ba37ebb06de206c74d73c7c2b422cca28a16d (patch)
tree91bb780e79dbb90406bbb3a5f3853e8174c8a7c3 /include/llvm/Instruction.h
parentbd27f5adbd8f3b8ab8def5aa43fbc406ac9b8cbe (diff)
downloadllvm-6f3ba37ebb06de206c74d73c7c2b422cca28a16d.tar.gz
llvm-6f3ba37ebb06de206c74d73c7c2b422cca28a16d.tar.bz2
llvm-6f3ba37ebb06de206c74d73c7c2b422cca28a16d.tar.xz
Fix AliasSetTracker so that it doesn't make any assumptions about instructions it doesn't know about (like the atomic instructions I'm adding).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136198 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instruction.h')
-rw-r--r--include/llvm/Instruction.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h
index 2459ef6076..934e890151 100644
--- a/include/llvm/Instruction.h
+++ b/include/llvm/Instruction.h
@@ -223,6 +223,13 @@ public:
///
bool mayReadFromMemory() const;
+ /// mayReadOrWriteMemory - Return true if this instruction may read or
+ /// write memory.
+ ///
+ bool mayReadOrWriteMemory() const {
+ return mayReadFromMemory() || mayWriteToMemory();
+ }
+
/// mayThrow - Return true if this instruction may throw an exception.
///
bool mayThrow() const;