private BasicBlockList convertBasicBlocks() {
    ArrayList<SsaBasicBlock> blocks = ssaMeth.getBlocks();

    // Exit block may be null.
    SsaBasicBlock exitBlock = ssaMeth.getExitBlock();

    BitSet reachable = ssaMeth.computeReachability();
    int ropBlockCount = reachable.cardinality();

    // Don't count the exit block, if it exists and is reachable.
    if (exitBlock != null && reachable.get(exitBlock.getIndex())) {
      ropBlockCount -= 1;
    }

    BasicBlockList result = new BasicBlockList(ropBlockCount);

    // Convert all the reachable blocks except the exit block.
    int ropBlockIndex = 0;
    for (SsaBasicBlock b : blocks) {
      if (reachable.get(b.getIndex()) && b != exitBlock) {
        result.set(ropBlockIndex++, convertBasicBlock(b));
      }
    }

    // The exit block, which is discarded, must do nothing.
    if (exitBlock != null && !exitBlock.getInsns().isEmpty()) {
      throw new RuntimeException("Exit block must have no insns when leaving SSA form");
    }

    return result;
  }
@return rop-form basic block list
android/android_framework/dex-maker/src/main/java/com/android/dx/ssa/back/SsaToRop.java