OPT_BitVector nloop = n.loop;
  private static boolean turnLoopIntoUntil(OPT_LSTNode n, OPT_IR ir) {    OPT_BitVector nloop = n.loop;    OPT_BasicBlock header = n.header;    OPT_BasicBlock newLoopTest = null;    int i = 0;    int exiters = 0;        OPT_BasicBlockEnumeration e = ir.getBasicBlocks (n.loop);    while (e.hasMoreElements()) {      OPT_BasicBlock b = e.next();      if (!exitsLoop (b, n.loop)) {        // header doesn't exit: nothing to do        if (b == n.header) return false;      } else {        exiters++;      }      i++;    }    // all blocks exit: can't improve    if (i == exiters) return false;    // rewriting loops where the header has more than one in-loop    // successor will lead to irreducible control flow.    OPT_BasicBlock succ[] = inLoopSuccessors (n);    if (succ.length > 1) {      if (DEBUG) VM.sysWrite ("unwhiling would lead to irreducible CFG\n");      return false;    }        OPT_BasicBlock pred[] = inLoopPredecessors (n);    float frequency = 0f;    if (pred.length > 0) {      frequency += edgeFrequency (pred[0], header);      // replicate the header as successor of pred[0]      OPT_BasicBlock p = header.prevBasicBlockInCodeOrder();      p.killFallThrough();      newLoopTest = pred[0].replicateThisOut (ir, header, p);    }    for (i = 1;  i < pred.length;  ++i) { // check for aditional back edges      frequency += edgeFrequency (pred[i], header);      pred[i].redirectOuts(header, newLoopTest, ir);    }    newLoopTest.setExecutionFrequency (frequency);    header.setExecutionFrequency (header.getExecutionFrequency() - frequency);    return  true;  }