public class

EMasterOptimizer

extends AbstractMasterOptimizer<T>
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractMasterOptimizer<T>
     ↳ com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt.EMasterOptimizer

Class Overview

Standard master optimizer for CFG of IEStatement IR instructions. Comes with a bundle of standard expression optimizers. Additional optimizers can be registered. Refer to the constructor javadoc. Special use registers can be specified in order to improve the optimization rate of the dead-code removal and expression substitution standard optimizers.

Summary

[Expand]
Inherited Constants
From class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractMasterOptimizer
Fields
public static int defaultMaxRunCount no max
[Expand]
Inherited Fields
From class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractMasterOptimizer
Public Constructors
EMasterOptimizer(IERoutineContext ectx)
Create a standard IR master optimizer with no maximum runcount (unsafe).
EMasterOptimizer(IERoutineContext ectx, int grp1NMaxRunCount)
Create a standard IR master optimizer.
Public Methods
void addDefaultInput(int bit, IEImm val)
void addDisregardedOutputBits(Collection<Integer> disregardedOutputBits)
void addDisregardedOutputFilter(IOptFilterCanDiscard filter)
void addDisregardedOutputVariables(Collection<? extends IEVar> disregardedOutputVars)
boolean canDiscardUnusedDefinition(CFG<IEStatement> cfg, int regDef, long insnAddress)
Check if an unused variable definition unused in the routine, but reaching the exit, can be discarded.
IEImm getDefaultInput(int reg)
Set<Integer> getDisregardedOutputRegisters()
static boolean isDefinitionReachingRoutineOutput(CFG<IEStatement> cfg, int reg, long address)
static boolean isReachingRoutineOutput(CFG<IEStatement> cfg, int reg)
Protected Methods
void debugValidate(IERoutineContext ctx)
void debugValidatePostOpti(IERoutineContext ctx, IOptimizer<IERoutineContext> opt, int cnt)
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractMasterOptimizer
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IMasterOptimizer

Fields

public static int defaultMaxRunCount

no max

Public Constructors

public EMasterOptimizer (IERoutineContext ectx)

Create a standard IR master optimizer with no maximum runcount (unsafe).

public EMasterOptimizer (IERoutineContext ectx, int grp1NMaxRunCount)

Create a standard IR master optimizer.

Parameters
ectx default context
grp1NMaxRunCount maximum run count for the group [1..N]

Public Methods

public void addDefaultInput (int bit, IEImm val)

public void addDisregardedOutputBits (Collection<Integer> disregardedOutputBits)

public void addDisregardedOutputFilter (IOptFilterCanDiscard filter)

public void addDisregardedOutputVariables (Collection<? extends IEVar> disregardedOutputVars)

public boolean canDiscardUnusedDefinition (CFG<IEStatement> cfg, int regDef, long insnAddress)

Check if an unused variable definition unused in the routine, but reaching the exit, can be discarded.

public IEImm getDefaultInput (int reg)

public Set<Integer> getDisregardedOutputRegisters ()

public static boolean isDefinitionReachingRoutineOutput (CFG<IEStatement> cfg, int reg, long address)

public static boolean isReachingRoutineOutput (CFG<IEStatement> cfg, int reg)

Protected Methods

protected void debugValidate (IERoutineContext ctx)

protected void debugValidatePostOpti (IERoutineContext ctx, IOptimizer<IERoutineContext> opt, int cnt)