private void addMatchHelper(LocalPointerKey pk, Collection<MemoryAccess> writes) { for (MemoryAccess a : writes) { addSubgraphForNode(a.getNode()); } for (MemoryAccess a : writes) { IR ir = a.getNode().getIR(); SSAPutInstruction s = (SSAPutInstruction) ir.getInstructions()[a.getInstructionIndex()]; PointerKey r = heapModel.getPointerKeyForLocal(a.getNode(), s.getVal()); assert containsNode(r); assert containsNode(pk); addMatchEdge(pk, r); } }
private void addArrayMatchEdges(LocalPointerKey pk) { Collection<MemoryAccess> arrayWrites = fam.getArrayWrites(null); for (MemoryAccess a : arrayWrites) { addSubgraphForNode(a.getNode()); } for (MemoryAccess a : arrayWrites) { IR ir = a.getNode().getIR(); SSAArrayStoreInstruction s = (SSAArrayStoreInstruction) ir.getInstructions()[a.getInstructionIndex()]; PointerKey r = heapModel.getPointerKeyForLocal(a.getNode(), s.getValue()); assert containsNode(r); assert containsNode(pk); addMatchEdge(pk, r); } }