// 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) {