public static OptimizationPlanElement[] createOptimizationPlan(OptOptions options){
  if (masterPlan == null) {
    initializeMasterPlan();
  }
  ArrayList<OptimizationPlanElement> temp=new ArrayList<OptimizationPlanElement>();
  for (  OptimizationPlanElement element : masterPlan) {
    if (element.shouldPerform(options)) {
      temp.add(element);
    }
  }
  if (VM.writingBootImage) {
    masterPlan=null;
  }
  return toArray(temp);
}

public static OptimizationPlanElement [ ] createOptimizationPlan ( OptOptions options ) { if ( masterPlan == null ) { initializeMasterPlan ( ) ; } ArrayList < OptimizationPlanElement > temp = new ArrayList < OptimizationPlanElement > ( ) ; for ( OptimizationPlanElement element : masterPlan ) { if ( element . shouldPerform ( options ) ) { temp . add ( element ) ; } } if ( VM . writingBootImage ) { masterPlan = null ; } return toArray ( temp ) ; }
using the passed options create an optimization plan by selecting a subset of the elements in the masterplan .
