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 |
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.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static int | defaultMaxRunCount | no max |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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) | ||||||||||
static int |
getDefinitionReachingRoutineOutput(CFG<IEStatement> cfg, int reg, long address)
Indicates if current definition is still valid at the end of the routine.
| ||||||||||
Set<Integer> | getDisregardedOutputRegisters() | ||||||||||
static boolean |
isDefinitionReachingRoutineOutput(CFG<IEStatement> cfg, int reg, long address)
Indicates if current definition is still valid at the end of the routine.
| ||||||||||
static boolean | isReachingRoutineOutput(CFG<IEStatement> cfg, int reg) |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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 target)
This method might be overridden, but the parent should be called first.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
no max
Create a standard IR master optimizer with no maximum runcount (unsafe).
Create a standard IR master optimizer.
ectx | default context |
---|---|
grp1NMaxRunCount | maximum run count for the group [1..N] |
Check if an unused variable definition unused in the routine, but reaching the exit, can be discarded.
Indicates if current definition is still valid at the end of the routine. Statuses are:
IESlice
) and
there is no guarantee if value may be redefined/removed.Indicates if current definition is still valid at the end of the routine. In other words, if false, indicates that this is the value can be inner redefined/removed if not used anymore.
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.