[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Oct 17 17:14:01 PDT 2002


Changes in directory llvm/lib/Analysis/DataStructure:

Local.cpp updated: 1.14 -> 1.15

---
Log message:

Calculate mod/ref info


---
Diffs of the changes:

Index: llvm/lib/Analysis/DataStructure/Local.cpp
diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.14 llvm/lib/Analysis/DataStructure/Local.cpp:1.15
--- llvm/lib/Analysis/DataStructure/Local.cpp:1.14	Wed Oct  2 17:14:38 2002
+++ llvm/lib/Analysis/DataStructure/Local.cpp	Thu Oct 17 17:13:19 2002
@@ -328,12 +328,15 @@
 
 void GraphBuilder::visitLoadInst(LoadInst &LI) {
   DSNodeHandle &Ptr = getValueDest(*LI.getOperand(0));
+  Ptr.getNode()->NodeType |= DSNode::Read;
+  
   if (isPointerType(LI.getType()))
     getValueNode(LI).addEdgeTo(getLink(Ptr, 0, LI.getType()));
 }
 
 void GraphBuilder::visitStoreInst(StoreInst &SI) {
   DSNodeHandle &Dest = getValueDest(*SI.getOperand(1));
+  Dest.getNode()->NodeType |= DSNode::Modified;
 
   // Avoid adding edges from null, or processing non-"pointer" stores
   if (isPointerType(SI.getOperand(0)->getType()) &&





More information about the llvm-commits mailing list