1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-04-14 06:37:33 +00:00

Calculate mod/ref info

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4223 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-10-17 22:13:19 +00:00
parent b65dfff141
commit 06285237ea

@ -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()) &&