public Iterable<BasicBlock> getOutgoingDestinationsOf(BasicBlock bb) { return scope.cfg().getOutgoingDestinations(bb); }
public Iterable<BasicBlock> getOutgoingDestinationsOf(BasicBlock bb) { return scope.cfg().getOutgoingDestinations(bb); }
private static void addJumpIfNextNotDestination(CFG cfg, BasicBlock next, Instr lastInstr, BasicBlock current) { Iterator<BasicBlock> outs = cfg.getOutgoingDestinations(current).iterator(); BasicBlock target = outs.hasNext() ? outs.next() : null; if (target != null && !outs.hasNext()) { if ((target != next) && ((lastInstr == null) || !lastInstr.getOperation().transfersControl())) { current.addInstr(new JumpInstr(target.getLabel())); } } }
private static void addJumpIfNextNotDestination(CFG cfg, BasicBlock next, Instr lastInstr, BasicBlock current) { Iterator<BasicBlock> outs = cfg.getOutgoingDestinations(current).iterator(); BasicBlock target = outs.hasNext() ? outs.next() : null; if (target != null && !outs.hasNext()) { if ((target != next) && ((lastInstr == null) || !lastInstr.getOperation().transfersControl())) { current.addInstr(new JumpInstr(target.getLabel())); } } }
private static void addJumpIfNextNotDestination(CFG cfg, BasicBlock next, Instr lastInstr, BasicBlock current) { Iterator<BasicBlock> outs = cfg.getOutgoingDestinations(current).iterator(); BasicBlock target = outs.hasNext() ? outs.next() : null; if (target != null && !outs.hasNext()) { if ((target != next) && ((lastInstr == null) || !lastInstr.getOperation().transfersControl())) { current.addInstr(new JumpInstr(target.getLabel())); } } }
private static void addJumpIfNextNotDestination(CFG cfg, BasicBlock next, Instr lastInstr, BasicBlock current) { Iterator<BasicBlock> outs = cfg.getOutgoingDestinations(current).iterator(); BasicBlock target = outs.hasNext() ? outs.next() : null; if (target != null && !outs.hasNext()) { if ((target != next) && ((lastInstr == null) || !lastInstr.getOperation().transfersControl())) { current.addInstr(new JumpInstr(target.getLabel())); } } }
for (BasicBlock dst: getOutgoingDestinations(b)) { int dstID = dst.getID(); if (!visited.get(dstID)) {
for (BasicBlock dst: getOutgoingDestinations(b)) { int dstID = dst.getID(); if (!visited.get(dstID)) {
for (BasicBlock dst: getOutgoingDestinations(b)) { int dstID = dst.getID(); if (!visited[dstID]) {
for (BasicBlock dst: getOutgoingDestinations(b)) { int dstID = dst.getID(); if (!visited[dstID]) {
protected void visitEdges(CFG cfg) { for (BasicBlock basicBlock: cfg.getBasicBlocks()) { startTag(writer, "block", "name", basicBlock.getLabel()); startTag(writer, "successors"); for (BasicBlock destination: cfg.getOutgoingDestinations(basicBlock)) { emptyTag(writer, "successor", "name", destination.getLabel()); } endTag(writer, "successors"); startTag(writer, "nodes"); for (Instr instr: basicBlock.getInstrs()) { emptyTag(writer, "node", "id", System.identityHashCode(instr)); } for (Instr instr: listener.removedList(basicBlock)) { emptyTag(writer, "removeNode", "id", System.identityHashCode(instr)); } endTag(writer, "nodes"); endTag(writer, "block"); } }
protected void visitEdges(CFG cfg) { for (BasicBlock basicBlock: cfg.getBasicBlocks()) { startTag(writer, "block", "name", basicBlock.getLabel()); startTag(writer, "successors"); for (BasicBlock destination: cfg.getOutgoingDestinations(basicBlock)) { emptyTag(writer, "successor", "name", destination.getLabel()); } endTag(writer, "successors"); startTag(writer, "nodes"); for (Instr instr: basicBlock.getInstrs()) { emptyTag(writer, "node", "id", System.identityHashCode(instr)); } for (Instr instr: listener.removedList(basicBlock)) { emptyTag(writer, "removeNode", "id", System.identityHashCode(instr)); } endTag(writer, "nodes"); endTag(writer, "block"); } }
for (BasicBlock b: cfg.getOutgoingDestinations(basicBlock)) { if (b.isExitBB()) continue;
(outs = scope.getCFG().getOutgoingDestinations(bb)) != null && outs.iterator().hasNext()) {
(outs = scope.getCFG().getOutgoingDestinations(bb)) != null && outs.iterator().hasNext()) {
public void computeDataFlowInfoForward(List<U> workList, BitSet bbSet) { for (Edge<BasicBlock> e: getCFG().getIncomingEdges(basicBlock)) { compute_MEET(e, problem.getFlowGraphNode(e.getSource().getData())); } initSolution(); // Initialize computation // Apply transfer function (analysis-specific) based on new facts after computing MEET for (Instr i : basicBlock.getInstrs()) { // System.out.println("TF: Processing: " + i); applyTransferFunction(i); } // If the solution has changed, add "dsts" to the work list. // No duplicates please which is why we have bbset. if (solutionChanged()) { for (BasicBlock b: getCFG().getOutgoingDestinations(basicBlock)) { processDestBB(workList, bbSet, b); } } finalizeSolution(); // Any post-computation cleanup }
public void computeDataFlowInfoForward(List<U> workList, BitSet bbSet) { for (Edge<BasicBlock> e: getCFG().getIncomingEdges(basicBlock)) { compute_MEET(e, problem.getFlowGraphNode(e.getSource().getData())); } initSolution(); // Initialize computation // Apply transfer function (analysis-specific) based on new facts after computing MEET for (Instr i : basicBlock.getInstrs()) { // System.out.println("TF: Processing: " + i); applyTransferFunction(i); } // If the solution has changed, add "dsts" to the work list. // No duplicates please which is why we have bbset. if (solutionChanged()) { for (BasicBlock b: getCFG().getOutgoingDestinations(basicBlock)) { processDestBB(workList, bbSet, b); } } finalizeSolution(); // Any post-computation cleanup }
if (changed) { if (problem.getFlowDirection() == DataFlowProblem.DF_Direction.FORWARD) { for (BasicBlock b: problem.getScope().cfg().getOutgoingDestinations(basicBlock)) { processDestBB(workList, bbSet, b);
if (changed) { if (problem.getFlowDirection() == DataFlowProblem.DF_Direction.FORWARD) { for (BasicBlock b: problem.getScope().cfg().getOutgoingDestinations(basicBlock)) { processDestBB(workList, bbSet, b);
for (BasicBlock destination : methodToInline.getOutgoingDestinations(methodToInline.getEntryBB())) { if (destination.isExitBB()) continue;