code: void performOptimizations() {
      checkState(options.shouldOptimize());
      List<PassFactory> optimizations = getPassConfig().getOptimizations();
      if (optimizations.isEmpty()) {
        return;
      }
  
      phaseOptimizer = createPhaseOptimizer();
      phaseOptimizer.consume(optimizations);
      phaseOptimizer.process(externsRoot, jsRoot);
      phaseOptimizer = null;
    }
docs: ------------------------------------------------------------------------