aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-22 16:35:53 +0000
committerChris Lattner <sabre@nondot.org>2002-07-22 16:35:53 +0000
commiteef796c767407aff5f29bd061a58c99b9b97927b (patch)
tree719adc3d0e24d13b80ba84a2d193bc01d2a6c76b /lib/Analysis
parent54ec7aed89e4a5d8cc11c36999d88012cbfcc18a (diff)
downloadexternal_llvm-eef796c767407aff5f29bd061a58c99b9b97927b.zip
external_llvm-eef796c767407aff5f29bd061a58c99b9b97927b.tar.gz
external_llvm-eef796c767407aff5f29bd061a58c99b9b97927b.tar.bz2
Always create a shadow node for a store instruction, even if it's storing
a scalar value. Likewise for load instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DataStructure/Local.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index 6d8b1b3..6ce3ae0 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -256,16 +256,16 @@ void GraphBuilder::visitGetElementPtrInst(GetElementPtrInst &GEP) {
}
void GraphBuilder::visitLoadInst(LoadInst &LI) {
- if (!isa<PointerType>(LI.getType())) return; // Only pointer PHIs
DSNode *Ptr = getSubscriptedNode(LI, getValueNode(*LI.getOperand(0)));
+ if (!isa<PointerType>(LI.getType())) return; // Only pointer PHIs
getValueNode(LI)->addEdgeTo(getLink(Ptr, 0));
}
void GraphBuilder::visitStoreInst(StoreInst &SI) {
+ DSNode *DestPtr = getSubscriptedNode(SI, getValueNode(*SI.getOperand(1)));
if (!isa<PointerType>(SI.getOperand(0)->getType())) return;
DSNode *Value = getValueNode(*SI.getOperand(0));
- DSNode *DestPtr = getValueNode(*SI.getOperand(1));
- getSubscriptedNode(SI, DestPtr)->addEdgeTo(getLink(Value, 0));
+ DestPtr->addEdgeTo(getLink(Value, 0));
}
void GraphBuilder::visitReturnInst(ReturnInst &RI) {