Put GCOVFile and other related interface in a common header so that llvm-cov tool...
[oota-llvm.git] / lib / VMCore / Instruction.cpp
index 863b098e8f8c8cd95cd0dbba79e2a4bd931d4b46..73191c19658cc0e77d3f7ca53ef9fd856ec3ec33 100644 (file)
@@ -320,7 +320,6 @@ 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();
@@ -341,7 +340,6 @@ 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();
@@ -438,6 +436,10 @@ bool Instruction::isSafeToSpeculativelyExecute() const {
   case Unwind:
   case Unreachable:
   case Fence:
+  case LandingPad:
+  case AtomicRMW:
+  case AtomicCmpXchg:
+  case Resume:
     return false; // Misc instructions which have effects
   }
 }