java.lang.Object | ||
↳ | com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractMasterOptimizer<T extends com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizerTarget> | |
↳ | com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt.EMasterOptimizer |
Standard master optimizer for CFG
of IEStatement
IR instructions. Comes with a
bundle of standard expression optimizers, all registered in the DEFAULT_GROUP
.
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.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IMasterOptimizer
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static final EMasterOptimizer | EMPTY | ||||||||||
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.
| |||||||||||
EMasterOptimizer(IERoutineContext ectx, int grp1NMaxRunCount, boolean autoRegisterStandardOptimizers)
Create a standard IR master optimizer.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | addDefaultInput(int bit, IEImm val) | ||||||||||
void | addDisregardedOutputBits(Collection<Integer> disregardedOutputBits) | ||||||||||
void | addDisregardedOutputFilter(IEOptFilterCanDiscard filter) | ||||||||||
void | addDisregardedOutputVariables(Collection<? extends IEVar> disregardedOutputVars) | ||||||||||
boolean |
canDiscardReachingOutDefinition(IERoutineContext ectx, long insnAddress, int def)
Check if an unused variable definition, bleeding out from the routine, may be safely
discarded.
| ||||||||||
boolean |
canDiscardUnusedDefinition(IERoutineContext ectx, long insnAddress, int def)
Check if an unused variable definition, not bleeding out from the routine, may be
safely discarded.
| ||||||||||
IEImm | getDefaultInput(int reg) | ||||||||||
Set<Integer> | getDisregardedOutputRegisters() | ||||||||||
void | setDecryptorSupport(int value) |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | getTargetAddress(IERoutineContext target) | ||||||||||
boolean |
onOptimizerException(IERoutineContext ctx, IOptimizer<IERoutineContext> opt, Exception ex)
This method is called when an optimizer hard-failed and generated an exception.
| ||||||||||
void |
postAllOptimizationsCallback(IERoutineContext ctx)
This method might be overridden, but the parent should be called first.
| ||||||||||
void |
postOptimizationCallback(IERoutineContext ctx, OptimizerEntry<IERoutineContext> e, int cnt, long executionTimeMs)
This method might be overridden, but the parent should be called first.
| ||||||||||
void |
preAllOptimizationsCallback(IERoutineContext ctx)
This method might be overridden, but the parent should be called first.
| ||||||||||
void |
preOptimizationCallback(IERoutineContext ctx, OptimizerEntry<IERoutineContext> e)
This method might be overridden, but the parent should be called first.
|
[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.ir.opt.IEMasterOptimizer
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IMasterOptimizer
|
no max
Create a standard IR master optimizer with no maximum runcount (unsafe).
ectx | optional default context; the target routine may be set after construction using #setTarget(IERoutineContext) |
---|
Create a standard IR master optimizer.
ectx | optional default context; the target routine may be set after construction using #setTarget(IERoutineContext) |
---|---|
grp1NMaxRunCount | maximum run count for the group [1..N] |
Create a standard IR master optimizer.
ectx | optional default context; the target routine may be set after construction using #setTarget(IERoutineContext) |
---|---|
grp1NMaxRunCount | maximum run count for the group [1..N] |
Check if an unused variable definition, bleeding out from the routine, may be safely discarded.
The implementation may depend on the master optimizer's mode
.
insnAddress | instruction address |
---|---|
def | defined, unused variable |
Check if an unused variable definition, not bleeding out from the routine, may be safely discarded.
The implementation may depend on the master optimizer's mode
.
insnAddress | instruction address |
---|---|
def | defined, unused variable |
This method is called when an optimizer hard-failed and generated an exception.
ctx | the target that being optimized |
---|---|
opt | the failing optimizer |
ex | the generated exception |
This method might be overridden, but the parent should be called first.
This method might be overridden, but the parent should be called first. Note that this method might have a big impact on decompilation performance, so override carefully.
This method might be overridden, but the parent should be called first.
This method might be overridden, but the parent should be called first. Note that this method might have a big impact on decompilation performance, so override carefully.