private void run() {
    SsaBasicBlock root = postdom ? meth.getExitBlock() : meth.getEntryBlock();

    if (root != null) {
      vertex.add(root);
      domInfos[root.getIndex()].idom = root.getIndex();
    }

    /*
     * First we perform a DFS numbering of the blocks, by
     * numbering the dfs tree roots.
     */

    DfsWalker walker = new DfsWalker();
    meth.forEachBlockDepthFirst(postdom, walker);

    // the largest semidom number assigned
    int dfsMax = vertex.size() - 1;

    // Now calculate semidominators.
    for (int i = dfsMax; i >= 2; --i) {
      SsaBasicBlock w = vertex.get(i);
      DFSInfo wInfo = info[w.getIndex()];

      BitSet preds = getPreds(w);
      for (int j = preds.nextSetBit(0); j >= 0; j = preds.nextSetBit(j + 1)) {
        SsaBasicBlock predBlock = blocks.get(j);
        DFSInfo predInfo = info[predBlock.getIndex()];

        /*
         * PredInfo may not exist in case the predecessor is
         * not reachable.
         */
        if (predInfo != null) {
          int predSemidom = info[eval(predBlock).getIndex()].semidom;
          if (predSemidom < wInfo.semidom) {
            wInfo.semidom = predSemidom;
          }
        }
      }
      info[vertex.get(wInfo.semidom).getIndex()].bucket.add(w);

      /*
       * Normally we would call link here, but in our O(m log n)
       * implementation this is equivalent to the following
       * single line.
       */
      wInfo.ancestor = wInfo.parent;

      // Implicity define idom for each vertex.
      ArrayList<SsaBasicBlock> wParentBucket;
      wParentBucket = info[wInfo.parent.getIndex()].bucket;

      while (!wParentBucket.isEmpty()) {
        int lastItem = wParentBucket.size() - 1;
        SsaBasicBlock last = wParentBucket.remove(lastItem);
        SsaBasicBlock U = eval(last);
        if (info[U.getIndex()].semidom < info[last.getIndex()].semidom) {
          domInfos[last.getIndex()].idom = U.getIndex();
        } else {
          domInfos[last.getIndex()].idom = wInfo.parent.getIndex();
        }
      }
    }

    // Now explicitly define the immediate dominator of each vertex
    for (int i = 2; i <= dfsMax; ++i) {
      SsaBasicBlock w = vertex.get(i);
      if (domInfos[w.getIndex()].idom != vertex.get(info[w.getIndex()].semidom).getIndex()) {
        domInfos[w.getIndex()].idom = domInfos[domInfos[w.getIndex()].idom].idom;
      }
    }
  }
Performs dominator/post-dominator calculation for the control flow graph.

@param meth {@code non-null;} method to analyze
android/android_framework/dex-maker/src/main/java/com/android/dx/ssa/Dominators.java