Class AbstractEStatementOptimizer

All Implemented Interfaces:
IPlugin, IEOptimizer, IOptimizer<IERoutineContext>

public abstract class AbstractEStatementOptimizer extends AbstractEOptimizer
Skeleton for an IRE statement optimizer.
  • Constructor Details

  • Method Details

    • perform

      protected int perform()
      Description copied from class: AbstractEOptimizer
      Perform the optimization pass. The caller may request that data chains not be updated, whenever possible. (They may be updated internally by the optimizer, which has the final say as to how and when DFA calculations should be run.)

      The above means that data chains after running this method may or may not have been modified, and may or may not be in a consistent state with the optimized CFG.

      Specified by:
      perform in class AbstractEOptimizer
      Returns:
      the result of a call to one of postPerform(...) or a negative number indicating an error has occurred and the optimizing process should be aborted
    • optimizeStatement

      protected abstract IEStatement optimizeStatement(IEStatement stm)
      Attempt to optimize a statement. Sub-expressions may be examined. The implementor should not attempt to modify parent or cousins expressions.
      Parameters:
      stm - the statement to be optimized
      Returns:
      the new, optimized statement, which will count for one optimization (the provided statement may be returned); null if the statement was not optimized