[llvm-commits] [llvm] r137662 - /llvm/trunk/lib/Analysis/Loads.cpp

Eli Friedman eli.friedman at gmail.com
Mon Aug 15 14:56:39 PDT 2011


Author: efriedma
Date: Mon Aug 15 16:56:39 2011
New Revision: 137662

URL: http://llvm.org/viewvc/llvm-project?rev=137662&view=rev
Log:
Add some comments here because the lack of a check for volatile/atomic here is a bit unusual.


Modified:
    llvm/trunk/lib/Analysis/Loads.cpp

Modified: llvm/trunk/lib/Analysis/Loads.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/Loads.cpp?rev=137662&r1=137661&r2=137662&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/Loads.cpp (original)
+++ llvm/trunk/lib/Analysis/Loads.cpp Mon Aug 15 16:56:39 2011
@@ -188,12 +188,16 @@
     
     --ScanFrom;
     // If this is a load of Ptr, the loaded value is available.
+    // (This is true even if the load is volatile or atomic, although
+    // those cases are unlikely.)
     if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
       if (AreEquivalentAddressValues(LI->getOperand(0), Ptr))
         return LI;
     
     if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
       // If this is a store through Ptr, the value is available!
+      // (This is true even if the store is volatile or atomic, although
+      // those cases are unlikely.)
       if (AreEquivalentAddressValues(SI->getOperand(1), Ptr))
         return SI->getOperand(0);
       





More information about the llvm-commits mailing list