public StatementVisitor(HeapModel heapModel, IFlowGraph g, IClassHierarchy cha, CallGraph cg, CGNode node) { super(); this.heapModel = heapModel; this.g = g; this.cha = cha; this.cg = cg; this.node = node; this.ir = node.getIR(); this.du = node.getDU(); this.symbolTable = ir.getSymbolTable(); assert symbolTable != null; }
public StatementVisitor(HeapModel heapModel, IFlowGraph g, IClassHierarchy cha, CallGraph cg, CGNode node) { super(); this.heapModel = heapModel; this.g = g; this.cha = cha; this.cg = cg; this.node = node; this.ir = node.getIR(); this.du = node.getDU(); this.symbolTable = ir.getSymbolTable(); assert symbolTable != null; }
/** * precondition: !mayBeLiveInSomeCaller(ik, m) * * @param instructionIndex index of an SSA instruction */ private boolean mayBeLiveIntraprocedural(InstanceKey ik, CGNode m, int instructionIndex) { IR ir = m.getIR(); DefUse du = m.getDU(); for (Object p : Iterator2Iterable.make(DFS.iterateDiscoverTime(GraphInverter.invert(heapGraph), ik))) { if (p instanceof LocalPointerKey) { LocalPointerKey lpk = (LocalPointerKey) p; if (lpk.getNode().equals(m)) { if (LocalLiveRangeAnalysis.isLive(lpk.getValueNumber(), instructionIndex, ir, du)) { return true; } } } } return false; }
/** * precondition: !mayBeLiveInSomeCaller(ik, m) * * @param instructionIndex index of an SSA instruction */ private boolean mayBeLiveIntraprocedural(InstanceKey ik, CGNode m, int instructionIndex) { IR ir = m.getIR(); DefUse du = m.getDU(); for (Object p : Iterator2Iterable.make(DFS.iterateDiscoverTime(GraphInverter.invert(heapGraph), ik))) { if (p instanceof LocalPointerKey) { LocalPointerKey lpk = (LocalPointerKey) p; if (lpk.getNode().equals(m)) { if (LocalLiveRangeAnalysis.isLive(lpk.getValueNumber(), instructionIndex, ir, du)) { return true; } } } } return false; }
protected void unconditionallyAddConstraintsFromNode(CGNode node) { if (DEBUG) { System.err.println(("Visiting CGNode " + node)); } if (SSAPropagationCallGraphBuilder.PERIODIC_WIPE_SOFT_CACHES) { wipeCount++; if (wipeCount >= SSAPropagationCallGraphBuilder.WIPE_SOFT_CACHE_INTERVAL) { wipeCount = 0; ReferenceCleanser.clearSoftCaches(); } } IR ir = node.getIR(); debugPrintIR(ir); if (ir == null) { return; } DefUse du = node.getDU(); addNodeInstructionConstraints(node, ir, du); addNodePassthruExceptionConstraints(node, ir); }
protected void unconditionallyAddConstraintsFromNode(CGNode node) { if (DEBUG) { System.err.println(("Visiting CGNode " + node)); } if (SSAPropagationCallGraphBuilder.PERIODIC_WIPE_SOFT_CACHES) { wipeCount++; if (wipeCount >= SSAPropagationCallGraphBuilder.WIPE_SOFT_CACHE_INTERVAL) { wipeCount = 0; ReferenceCleanser.clearSoftCaches(); } } IR ir = node.getIR(); debugPrintIR(ir); if (ir == null) { return; } DefUse du = node.getDU(); addNodeInstructionConstraints(node, ir, du); addNodePassthruExceptionConstraints(node, ir); }
LocalPointerKey lpk = (LocalPointerKey) userObject; IR ir1 = lpk.getNode().getIR(); SSAInstruction def = lpk.getNode().getDU().getDef(lpk.getValueNumber()); int pc1 = IrViewer.NA; if (def != null){
private IntSet identifyDependentParameters(CGNode caller, CallSiteReference site) { MutableIntSet dependentParameters = IntSetUtil.make(); SSAAbstractInvokeInstruction inst = caller.getIR().getCalls(site)[0]; DefUse du = caller.getDU(); for(int i = 0; i < inst.getNumberOfPositionalParameters(); i++) { MutableIntSet values = IntSetUtil.make(); values.add(inst.getUse(i)); collectValues(du, du.getDef(inst.getUse(i)), values); if (values.contains(index+1)) dependentParameters.add(i); } return dependentParameters; }
private IntSet identifyDependentParameters(CGNode caller, CallSiteReference site) { MutableIntSet dependentParameters = IntSetUtil.make(); SSAAbstractInvokeInstruction inst = caller.getIR().getCalls(site)[0]; DefUse du = caller.getDU(); for(int i = 0; i < inst.getNumberOfPositionalParameters(); i++) { MutableIntSet values = IntSetUtil.make(); values.add(inst.getUse(i)); collectValues(du, du.getDef(inst.getUse(i)), values); if (values.contains(index+1)) dependentParameters.add(i); } return dependentParameters; }
LocalPointerKey lpk = (LocalPointerKey) userObject; IR ir1 = lpk.getNode().getIR(); SSAInstruction def = lpk.getNode().getDU().getDef(lpk.getValueNumber()); int pc1 = IrViewer.NA; if (def != null){
CGNode node = lpk.getNode(); IR ir = node.getIR(); DefUse du = node.getDU(); if (((SSAPropagationCallGraphBuilder) builder).contentsAreInvariant(ir.getSymbolTable(), du, lpk.getValueNumber())) {
CGNode node = lpk.getNode(); IR ir = node.getIR(); DefUse du = node.getDU(); if (((SSAPropagationCallGraphBuilder) builder).contentsAreInvariant(ir.getSymbolTable(), du, lpk.getValueNumber())) {
SSAInstruction instr = caller.getDU().getDef(paramUse); if (!(instr instanceof SSANewInstruction)) { return new ReceiverInstanceContext(receiver[0]);
SSAInstruction instr = caller.getDU().getDef(paramUse); if (!(instr instanceof SSANewInstruction)) { return new ReceiverInstanceContext(receiver[0]);