Interface IDMasterOptimizerInstrumenter

All Known Implementing Classes:
AbstractDInstrumenter

public interface IDMasterOptimizerInstrumenter
Instrumenter interface for IR master optimizer (MO). An instrumenter is used to examine and guide the optimization process of a method IR.
  • Method Details

    • beforePass

      int beforePass(IDOptimizer opt, IDMethodContext ctx)
      This method is called by the MO before a method-optimizer is about to be executed.
      Parameters:
      opt - the method optimizer
      ctx - the IR context
      Returns:
      0=no control code, let a subsequent instrumenter decide; -1=stop the entire optimization process; 1=skip this optimizer
    • afterPass

      int afterPass(IDOptimizer opt, IDMethodContext ctx, int optcnt)
      This method is called by the MO after a method-optimizer successfully returned.
      Parameters:
      opt - the method optimizer
      ctx - the IR context
      optcnt - the number of optimizations performed; may be 0
      Returns:
      0=no control code, let a subsequent instrumenter decide; -1=stop the entire optimization process
    • afterFailedPass

      int afterFailedPass(IDOptimizer opt, IDMethodContext ctx, Exception ex)
      This method is called by the MO after a method-optimizer failed.
      Parameters:
      opt - the method optimizer
      ctx - the IR context
      ex - the exception that was thrown by the optimizer
      Returns:
      0=no control code, let a subsequent instrumenter decide; -1=stop the entire optimization process