if (s != null) { lhs2.type = t2; rhs2.type = t2; } break; case OPT_Register.INTEGER_TYPE: OPT_RegisterOperand lhs = OPT_IRTools.I(r); OPT_RegisterOperand rhs = OPT_IRTools.I(r); s = Unary.create(SPLIT,lhs,rhs);   VM_TypeReference t = null; OPT_RegisterOperandEnumeration e = OPT_DefUse.defs(r); if (!e.hasMoreElements()) { s = null; } else { OPT_RegisterOperand rop = e.next(); t = rop.type; while (e.hasMoreElements()) { OPT_RegisterOperand nextOp = e.next(); if (nextOp.type != t) { s = null; }
} if (s != null) { lhs2.type = t2; rhs2.type = t2; } break; case OPT_Register.INTEGER_TYPE: OPT_RegisterOperand lhs = OPT_IRTools.I(r); OPT_RegisterOperand rhs = OPT_IRTools.I(r); s = Unary.create(SPLIT,lhs,rhs);   VM_TypeReference t = null; OPT_RegisterOperandEnumeration e = OPT_DefUse.defs(r); if (!e.hasMoreElements()) { s = null; } else { OPT_RegisterOperand rop = e.next(); t = rop.type; while (e.hasMoreElements()) { OPT_RegisterOperand nextOp = e.next(); if (nextOp.type != t) { s = null;
    private static void transform(OPT_IR ir, HashMap xform) {      for (Iterator i = xform.keySet().iterator(); i.hasNext(); ) {        BasicBlockPair bbp = (BasicBlockPair)i.next();        HashSet toSplit = (HashSet)xform.get(bbp);                // we go ahead and split all edges, instead of just critical ones.        // we'll clean up the mess later after SSA.        OPT_BasicBlock target = OPT_IRTools.makeBlockOnEdge(bbp.src,                                                            bbp.dest,ir);        OPT_SSA.replaceBlockInPhis(bbp.dest,bbp.src,target);                for (Iterator splits = toSplit.iterator(); splits.hasNext(); ) {          OPT_Register r = (OPT_Register)splits.next();          if (r.defList == null) continue;          OPT_Instruction s = null;          switch (r.getType()) {            case OPT_Register.ADDRESS_TYPE:              OPT_RegisterOperand lhs2 = OPT_IRTools.A(r);              OPT_RegisterOperand rhs2 = OPT_IRTools.A(r);              s = Unary.create(SPLIT,lhs2,rhs2);              // fix up types: only split live ranges when the type is              // consistent at all defs              VM_TypeReference t2 = null;              OPT_RegisterOperandEnumeration e2 = OPT_DefUse.defs(r);              if (!e2.hasMoreElements()) {                s = null;              } else {                OPT_RegisterOperand rop2 = e2.next();                t2 = rop2.type;                while (e2.hasMoreElements()) {                  OPT_RegisterOperand nextOp2 = e2.next();                  if (nextOp2.type != t2) {                    s = null;                  }                }              }              if (s != null) {                lhs2.type = t2;                rhs2.type = t2;              }              break;            case OPT_Register.INTEGER_TYPE:              OPT_RegisterOperand lhs = OPT_IRTools.I(r);              OPT_RegisterOperand rhs = OPT_IRTools.I(r);              s = Unary.create(SPLIT,lhs,rhs);              // fix up types: only split live ranges when the type is              // consistent at all defs              VM_TypeReference t = null;              OPT_RegisterOperandEnumeration e = OPT_DefUse.defs(r);              if (!e.hasMoreElements()) {                s = null;              } else {                OPT_RegisterOperand rop = e.next();                t = rop.type;                while (e.hasMoreElements()) {                  OPT_RegisterOperand nextOp = e.next();                  if (nextOp.type != t) {                    s = null;                  }                }              }              if (s != null) {                lhs.type = t;                rhs.type = t;              }              break;            case OPT_Register.FLOAT_TYPE:              s = Unary.create(SPLIT,OPT_IRTools.F(r), OPT_IRTools.F(r));              break;            case OPT_Register.DOUBLE_TYPE:              s = Unary.create(SPLIT,OPT_IRTools.D(r), OPT_IRTools.D(r));              break;            case OPT_Register.LONG_TYPE:              s = Unary.create(SPLIT,OPT_IRTools.L(r), OPT_IRTools.L(r));              break;            default:              // we won't split live ranges for other types.              s = null;              break;          }          if (s != null) {            target.prependInstruction(s);          }        }      }    }