diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-08-15 21:14:31 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-08-15 21:14:31 +0000 |
commit | 9d6070f161d89376c7c834950f518e25e34d7ce8 (patch) | |
tree | 5e19b166cd4a7abe7849411136fd44f51ce9fe71 /lib/VMCore/Instruction.cpp | |
parent | 0455bb89cde2c1153c6ed1a5bf5b380ed6d43675 (diff) | |
download | llvm-9d6070f161d89376c7c834950f518e25e34d7ce8.tar.gz llvm-9d6070f161d89376c7c834950f518e25e34d7ce8.tar.bz2 llvm-9d6070f161d89376c7c834950f518e25e34d7ce8.tar.xz |
Duncan pointed out that the LandingPadInst might read memory. (It might also
write to memory.) Marking it as such makes some checks for immobility go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137655 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instruction.cpp')
-rw-r--r-- | lib/VMCore/Instruction.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp index 22656f3353..9e55a083db 100644 --- a/lib/VMCore/Instruction.cpp +++ b/lib/VMCore/Instruction.cpp @@ -320,6 +320,7 @@ bool Instruction::mayReadFromMemory() const { case Instruction::Fence: // FIXME: refine definition of mayReadFromMemory case Instruction::AtomicCmpXchg: case Instruction::AtomicRMW: + case Instruction::LandingPad: return true; case Instruction::Call: return !cast<CallInst>(this)->doesNotAccessMemory(); @@ -340,6 +341,7 @@ bool Instruction::mayWriteToMemory() const { case Instruction::VAArg: case Instruction::AtomicCmpXchg: case Instruction::AtomicRMW: + case Instruction::LandingPad: return true; case Instruction::Call: return !cast<CallInst>(this)->onlyReadsMemory(); |