public final OPT_BasicBlock replicateThisOut (OPT_IR ir, OPT_BasicBlock b, OPT_BasicBlock pred) {  if (b.isExit()) return null;   OPT_BasicBlock bCopy = b.copyWithoutLinks(ir);    OPT_BasicBlock bFallThrough = b.getFallThroughBlock(); if (bFallThrough != null) { OPT_Instruction g = Goto.create(GOTO,bFallThrough.makeJumpTarget()); bCopy.appendInstruction(g); } bCopy.recomputeNormalOut(ir);   redirectOuts (b, bCopy,ir);   pred.killFallThrough(); OPT_BasicBlock next = pred.nextBasicBlockInCodeOrder(); if (next != null) { ir.cfg.breakCodeOrder(pred,next); ir.cfg.linkInCodeOrder(bCopy,next); } ir.cfg.linkInCodeOrder(pred,bCopy);  return bCopy;
public final OPT_BasicBlock replicateThisOut (OPT_IR ir, OPT_BasicBlock b) { return replicateThisOut (ir, b, this);
  public final OPT_BasicBlock replicateThisOut (OPT_IR ir, OPT_BasicBlock b,                                         OPT_BasicBlock pred) {    // don't replicate the exit node    if (b.isExit()) return null;          // 1. create the replicated block (bCopy)    OPT_BasicBlock bCopy = b.copyWithoutLinks(ir);    // 2. If b has a fall-through edge, insert the appropriate GOTO at    // the end of bCopy    OPT_BasicBlock bFallThrough = b.getFallThroughBlock();    if (bFallThrough != null) {      OPT_Instruction g = Goto.create(GOTO,bFallThrough.makeJumpTarget());      bCopy.appendInstruction(g);    }    bCopy.recomputeNormalOut(ir);        // 3. update the branch instructions in 'this' to point to bCopy    redirectOuts (b, bCopy,ir);        // 4. link the new basic into the code order, immediately following pred    pred.killFallThrough();    OPT_BasicBlock next = pred.nextBasicBlockInCodeOrder();    if (next != null) {      ir.cfg.breakCodeOrder(pred,next);      ir.cfg.linkInCodeOrder(bCopy,next);    }    ir.cfg.linkInCodeOrder(pred,bCopy);        return bCopy;  }