/** * @return an integer telling which predecessor of Y in CFG is X. The jth operand of a * phi-function in Y corresponds to the jth predecessor of Y from the listing of the in edges * of Y */ private int whichPred(BasicBlock X, BasicBlock Y) { int j = 0; for (BasicBlock P : cfg.getPredecessors(X)) { if (P.equals(Y)) { return j; } j++; } throw new IllegalArgumentException("X is not a predecessor of Y"); }