Package dk.brics.xact.analysis.flowgraph.statements

Examples of dk.brics.xact.analysis.flowgraph.statements.Assignment


    // copy propagation
    for (Statement s : new LinkedHashSet<Statement>(graph.getNodes())) {
      if (s instanceof VarStm) {
        VarStm vs = (VarStm)s;
        if (graph.getInEdges(vs).size() == 1) {
          Assignment pred = (Assignment)(graph.getInEdges(vs).iterator().next()).getFrom();
          if (graph.getOutEdges(pred).size()==1) {
            // variable assignment with unique predecessor node that has no other successors - bypass this assignment
            pred.setDest(vs.getDest());
            for (Edge<Statement,VariableFilter> e : graph.getOutEdges(vs))
              graph.addEdge(pred, e.getTo(), e.getData()); // XXX: ok to lose some edge info?
            graph.removeNode(vs);
          }
        } else if (graph.getOutEdges(vs).size() == 1) {
View Full Code Here

TOP

Related Classes of dk.brics.xact.analysis.flowgraph.statements.Assignment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.