mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
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
This commit is contained in:
parent
54ec7aed89
commit
eef796c767
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user