aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/Local.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-17 22:13:19 +0000
committerChris Lattner <sabre@nondot.org>2002-10-17 22:13:19 +0000
commit06285237ea4fbf29ac205432a343b8d555e51fd3 (patch)
tree4fbcc76e0f3a660446bab482507bddef3b0bb376 /lib/Analysis/DataStructure/Local.cpp
parentb65dfff1416f41ce8b73fbbeee9a6f3c5c1a858b (diff)
Calculate mod/ref info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4223 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Local.cpp')
-rw-r--r--lib/Analysis/DataStructure/Local.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index 5020cf982f..43fd5a4a54 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -328,12 +328,15 @@ void GraphBuilder::visitGetElementPtrInst(GetElementPtrInst &GEP) {
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()) &&