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

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
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.
Set<Integer> getDisregardedOutputRegisters()
static boolean isDefinitionReachingRoutineOutput(CFG<IEStatement> cfg, int reg, long address)
boolean isDisregardReachingOutput()
static boolean isReachingRoutineOutput(CFG<IEStatement> cfg, int reg)
void setDefaultDisregardedOutputRegisters(Set<Integer> disregardedOutputRegisters)
void setDisregardReachingOutput(boolean disregardReachingOutput)
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 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 Set<Integer> getDisregardedOutputRegisters ()

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

public boolean isDisregardReachingOutput ()

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

public void setDefaultDisregardedOutputRegisters (Set<Integer> disregardedOutputRegisters)

public void setDisregardReachingOutput (boolean disregardReachingOutput)

Protected Methods

protected void debugValidate (IERoutineContext ctx)

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