Phi.setPred(s,j,new OPT_BasicBlockOperand(X));
  private void search(OPT_BasicBlock X, Stack[] S) {    if (DEBUG) System.out.println("SEARCH " + X);    OPT_SSADictionary dictionary = ir.HIRInfo.SSADictionary;    for (OPT_InstructionEnumeration ie =          X.forwardInstrEnumerator(); ie.hasMoreElements();) {      OPT_Instruction A = ie.next();      if (A.operator() != PHI) {        // replace each use        for (int u = A.getNumberOfDefs(); u < A.getNumberOfOperands(); u++) {          OPT_Operand op = A.getOperand(u);          if (op instanceof OPT_RegisterOperand) {            OPT_RegisterOperand rop = (OPT_RegisterOperand)op;            OPT_Register r1 = rop.register;            if (r1.isSSA()) continue;            if (r1.isPhysical()) continue;            OPT_RegisterOperand r2 = (OPT_RegisterOperand)S[r1.getNumber()].peek();            if (DEBUG) System.out.println("REPLACE NORMAL USE " + r1 + " with " + r2);            if (r2 != null) {              rop.register = r2.register;              OPT_DefUse.recordUse(rop);            }          }        }      }      // replace each def      for (int d = 0; d < A.getNumberOfDefs(); d++) {        OPT_Operand op = A.getOperand(d);        if (op instanceof OPT_RegisterOperand) {          OPT_RegisterOperand rop = (OPT_RegisterOperand)op;          OPT_Register r1 = rop.register;          if (r1.isSSA()) continue;          if (r1.isPhysical()) continue;          OPT_Register r2 = ir.regpool.getReg(r1);          if (DEBUG) System.out.println("PUSH " + r2 + " FOR " + r1 + " BECAUSE " + A);          S[r1.getNumber()].push(new OPT_RegisterOperand(r2, rop.type));          rop.setRegister(r2);          r2.scratchObject = r1;        }      }    } // end of first loop    if (DEBUG) System.out.println("SEARCH (second loop) " + X);    for (OPT_BasicBlockEnumeration y = X.getOut(); y.hasMoreElements();) {      OPT_BasicBlock Y = y.next();      if (DEBUG) System.out.println(" Successor: " + Y);      int j = numPredProcessed[Y.getNumber()]++;      if (Y.isExit()) continue;      OPT_Instruction s = Y.firstRealInstruction();      if (s == null) continue;      // replace use USE in each PHI instruction      if (DEBUG) System.out.println(" Predecessor: " + j);      while (s.operator() == PHI) {        OPT_Operand val = Phi.getValue(s,j);        if (val.isRegister()) {          OPT_Register r1 = ((OPT_RegisterOperand)Phi.getValue(s,j)).register;          // ignore registers already marked SSA by a previous pass          if (!r1.isSSA()) {            OPT_RegisterOperand r2 = (OPT_RegisterOperand)S[r1.getNumber()].peek();            if (r2 == null) {              // in this case, the register is never defined along              // this particular control flow path into the basic              // block.  So, null out the operand to indicate that              // that case will never happen.              if (r1.isValidation()) {                Phi.setValue(s, j, new OPT_TrueGuardOperand());              } else {                if (ir.IRStage == ir.LIR) {                  Phi.setValue(s, j, new OPT_IntConstantOperand(0));                }                 else {                  Phi.setValue(s, j, new OPT_NullConstantOperand());                }              }            } else {              OPT_RegisterOperand rop = r2.copyRO();              Phi.setValue(s,j,rop);              Phi.setPred(s,j,new OPT_BasicBlockOperand(X));              OPT_DefUse.recordUse(rop);            }          }        }        s = s.nextInstructionInCodeOrder();      }    } // end of second loop    if (DEBUG) System.out.println("SEARCH (third loop) " + X);    for (Enumeration c = ir.HIRInfo.dominatorTree.getChildren(X);          c.hasMoreElements();) {      OPT_DominatorTreeNode v = (OPT_DominatorTreeNode)c.nextElement();      search(v.getBlock(), S);    } // end of third loop    if (DEBUG) System.out.println("SEARCH (fourth loop) " + X);    for (OPT_InstructionEnumeration a = X.forwardInstrEnumerator();          a.hasMoreElements();) {      OPT_Instruction A = a.next();      // loop over each def      for (int d = 0; d < A.getNumberOfDefs(); d++) {        OPT_Operand newOp = A.getOperand(d);        if (newOp == null) continue;        if (!newOp.isRegister()) continue;        OPT_Register newReg = newOp.asRegister().register;        if (newReg.isSSA()) continue;        if (newReg.isPhysical()) continue;        OPT_Register r1 = (OPT_Register)newReg.scratchObject;        S[r1.getNumber()].pop();        if (DEBUG) System.out.println("POP " + r1);      }    } // end of fourth loop    if (DEBUG) System.out.println("FINISHED SEARCH " + X);  }