[llvm-commits] [poolalloc] r141383 - /poolalloc/trunk/lib/DSA/Local.cpp

John Criswell criswell at uiuc.edu
Fri Oct 7 12:11:46 PDT 2011


Author: criswell
Date: Fri Oct  7 14:11:46 2011
New Revision: 141383

URL: http://llvm.org/viewvc/llvm-project?rev=141383&view=rev
Log:
Added comments.
No functionality changes.

Modified:
    poolalloc/trunk/lib/DSA/Local.cpp

Modified: poolalloc/trunk/lib/DSA/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Local.cpp?rev=141383&r1=141382&r2=141383&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Local.cpp (original)
+++ poolalloc/trunk/lib/DSA/Local.cpp Fri Oct  7 14:11:46 2011
@@ -362,7 +362,12 @@
 }
 
 void GraphBuilder::visitLoadInst(LoadInst &LI) {
-  DSNodeHandle Ptr = getValueDest(LI.getOperand(0));
+  //
+  // Create a DSNode for the poiner dereferenced by the load.  If the DSNode
+  // is NULL, do nothing more (this can occur if the load is loading from a
+  // NULL pointer constant (bugpoint can generate such code).
+  //
+  DSNodeHandle Ptr = getValueDest(LI.getPointerOperand());
   if (Ptr.isNull()) return; // Load from null
 
   // Make that the node is read from...





More information about the llvm-commits mailing list