diff options
author | Chris Lattner <sabre@nondot.org> | 2008-05-08 21:58:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-05-08 21:58:49 +0000 |
commit | 954907aa6fc800447b992d98236e0effb26c0de6 (patch) | |
tree | ce275ca923ce859ec38bf01308d162462895c374 /llvm/lib/VMCore/Instruction.cpp | |
parent | 93cea9fd1852da2ef4396eeef9edd92cc3907fda (diff) | |
download | bcm5719-llvm-954907aa6fc800447b992d98236e0effb26c0de6.tar.gz bcm5719-llvm-954907aa6fc800447b992d98236e0effb26c0de6.zip |
conservatively say that volatile stores read memory.
llvm-svn: 50872
Diffstat (limited to 'llvm/lib/VMCore/Instruction.cpp')
-rw-r--r-- | llvm/lib/VMCore/Instruction.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp index a446cc20a93..2316b486898 100644 --- a/llvm/lib/VMCore/Instruction.cpp +++ b/llvm/lib/VMCore/Instruction.cpp @@ -226,13 +226,14 @@ bool Instruction::mayReadFromMemory() const { default: return false; case Instruction::Free: case Instruction::VAArg: + case Instruction::Load: return true; case Instruction::Call: return !cast<CallInst>(this)->doesNotAccessMemory(); case Instruction::Invoke: return !cast<InvokeInst>(this)->doesNotAccessMemory(); - case Instruction::Load: - return true; + case Instruction::Store: + return cast<StoreInst>(this)->isVolatile(); } } |