[llvm-commits] [llvm] r50872 - /llvm/trunk/lib/VMCore/Instruction.cpp

Chris Lattner sabre at nondot.org
Thu May 8 14:58:50 PDT 2008


Author: lattner
Date: Thu May  8 16:58:49 2008
New Revision: 50872

URL: http://llvm.org/viewvc/llvm-project?rev=50872&view=rev
Log:
conservatively say that volatile stores read memory.

Modified:
    llvm/trunk/lib/VMCore/Instruction.cpp

Modified: llvm/trunk/lib/VMCore/Instruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instruction.cpp?rev=50872&r1=50871&r2=50872&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Instruction.cpp (original)
+++ llvm/trunk/lib/VMCore/Instruction.cpp Thu May  8 16:58:49 2008
@@ -226,13 +226,14 @@
   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();
   }
 }
 





More information about the llvm-commits mailing list