# Class: com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt.AbstractEExpressionOptimizer
- Super class: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt.AbstractEOptimizer`

Skeleton for a top\-down, recursive, [IEGeneric](com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric.md) optimizer. Expressions are provided in  depth\-first, pre\-order way: parent expressions are provided before their constituting children.  

  By default, [IEStatement](com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStatement.md)s are not candidates for optimization \(although they can be\).  Generally, [IEStatement](com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStatement.md)s should be optimized via the use an  [AbstractEStatementOptimizer](com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt.AbstractEStatementOptimizer.md).

## Constructor: AbstractEExpressionOptimizer
- parameter: `dataChainsUpdatePolicy`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt.DataChainsUpdatePolicy`

Description: Create an expression optimizer.
parameter: dataChainsUpdatePolicy: expression optimizers should have a policy of             [DataChainsUpdatePolicy#UPDATE_IF_OPTIMIZED](DataChainsUpdatePolicy#UPDATE_IF_OPTIMIZED) or             [DataChainsUpdatePolicy#UPDATE_IF_REQUIRED](DataChainsUpdatePolicy#UPDATE_IF_REQUIRED)

## Protected Field: currentStatement
Type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStatement`
Description: This field holds a reference to the top\-level parent statement of the expression currently  being optimized.

## Protected Field: skipLeftSideOfAssignment
Type: `boolean`
Description: Do not process left\-side of [statement](com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStatement.md). Exception: If the left\-side is an  [IEMem](com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEMem.md), the memory reference is processed.
  Default value: false.

## Protected Field: skipStatementProcessing
Type: `boolean`
Description: Optimize only the constituents of the IRE statements, not the statements themselves.
  Default value: true.

## Protected Method: doSubstitution
- parameter: `e`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric`
- parameter: `substitutions`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.SubstitutionDefinition[]`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric`

Description: Attempt to apply the first matching [SubstitutionDefinition](com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.SubstitutionDefinition.md) on an [IEGeneric](com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric.md)  expression.
parameter: e: the target expression to be matched and modified
parameter: substitutions: a list of candidate substitutions
return: null if no substitution was performed, else the new expression

## Protected Abstract Method: optimizeExpression
- parameter: `e`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt.AbstractEExpressionOptimizer.EOR`

Description: Attempt to optimize expressions. Sub\-expressions may be examined. The implementor should not  attempt to modify parent or cousins expressions.
parameter: e: IRE
return: the new \(optimized\) expression as well as DFA update hints, or null if the expression          could not be optimized

## Protected Method: perform
- return type: `int`


## Method: performOnExpression
- parameter: `exp`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric`
- parameter: `ectx`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.IERoutineContext`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric`


