OPT_BasicBlock bb = in.createSubBlock(-1, ir);
OPT_BasicBlock bb = in.createSubBlock(out.firstInstruction().bcIndex, ir);
  public static OPT_BasicBlock makeBlockOnEdge (OPT_BasicBlock in,                                                 OPT_BasicBlock out,                                                 OPT_IR ir) {    // 1. Create the new basic block    OPT_BasicBlock bb = in.createSubBlock(-1, ir);        // 2. Splice the new basic block into the code order    OPT_BasicBlock next = in.nextBasicBlockInCodeOrder();    if (next == null ) {      ir.cfg.addLastInCodeOrder(bb);    } else {      ir.cfg.breakCodeOrder(in, next);      ir.cfg.linkInCodeOrder(in, bb);      ir.cfg.linkInCodeOrder(bb, next);    }      // 3. update in's branch instructions    boolean foundGoto = false;    OPT_BranchOperand target = bb.makeJumpTarget();    OPT_BranchOperand outTarget = out.makeJumpTarget();    for (OPT_InstructionEnumeration e = in.reverseRealInstrEnumerator();         e.hasMoreElements();) {      OPT_Instruction s = e.next();      if (IfCmp2.conforms(s)) {        if (IfCmp2.getTarget1(s).similar(outTarget))          IfCmp2.setTarget1(s, (OPT_BranchOperand)target.copy());        if (IfCmp2.getTarget2(s).similar(outTarget))          IfCmp2.setTarget2(s, (OPT_BranchOperand)target.copy());      } else if (IfCmp.conforms(s)) {        if (IfCmp.getTarget(s).similar(outTarget)) {          IfCmp.setTarget(s, (OPT_BranchOperand)target.copy());        }      } else if (InlineGuard.conforms(s)) {        if (InlineGuard.getTarget(s).similar(outTarget))          InlineGuard.setTarget(s, (OPT_BranchOperand)target.copy());      } else if (Goto.conforms(s)) {        foundGoto = true;        if (Goto.getTarget(s).similar(outTarget))          Goto.setTarget(s, (OPT_BranchOperand)target.copy());      } else if (TableSwitch.conforms(s)) {        foundGoto = true;        if (TableSwitch.getDefault(s).similar(outTarget))          TableSwitch.setDefault(s, (OPT_BranchOperand)target.copy());        for (int i = 0; i < TableSwitch.getNumberOfTargets(s); i++)          if (TableSwitch.getTarget(s, i).similar(outTarget))            TableSwitch.setTarget(s, i, (OPT_BranchOperand)target.copy());      } else if (LowTableSwitch.conforms(s)) {        foundGoto = true;        for (int i = 0; i < LowTableSwitch.getNumberOfTargets(s); i++)          if (LowTableSwitch.getTarget(s, i).similar(outTarget))            LowTableSwitch.setTarget(s, i, (OPT_BranchOperand)target.copy());      } else if (LookupSwitch.conforms(s)) {        foundGoto = true;        if (LookupSwitch.getDefault(s).similar(outTarget))          LookupSwitch.setDefault(s, (OPT_BranchOperand)target.copy());        for (int i = 0; i < LookupSwitch.getNumberOfTargets(s); i++)          if (LookupSwitch.getTarget(s, i).similar(outTarget))            LookupSwitch.setTarget(s, i, (OPT_BranchOperand)target.copy());      } else {        // done processing all branches        break;      }    }        // 4. Add a goto bb->out     OPT_Instruction s = Goto.create(GOTO, out.makeJumpTarget());    bb.appendInstruction(s);    // add goto in->next    // if out was not the fallthrough, add a GOTO to preserve this    // control flow    if (out != next) {      // if there's already a GOTO, there's no fall through      if (!foundGoto) {        s = Goto.create(GOTO, next.makeJumpTarget());        in.appendInstruction(s);      }    }    // 5. Update the CFG    in.recomputeNormalOut(ir);    bb.recomputeNormalOut(ir);    return  bb;  }