Class AbstractEBlockOptimizer
java.lang.Object
com.pnfsoftware.jeb.core.AbstractPlugin
com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractOptimizer<IERoutineContext>
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt.AbstractEOptimizer
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt.AbstractEBlockOptimizer
- All Implemented Interfaces:
IPlugin
,IEOptimizer
,IOptimizer<IERoutineContext>
Skeleton for an
IRE
basic block
optimizer.-
Field Summary
Fields inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt.AbstractEOptimizer
cfg, ectx
Fields inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractOptimizer
logger
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizer
DEAD_CODE_REMOVER, DEOBFUSCATOR, PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_STANDARD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int
Attempt to optimize a basic block.protected int
perform()
Perform the optimization pass.Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt.AbstractEOptimizer
cleanCfg, deleteUnreachableTrampoline, dumpCfg, getDataChainsUpdatePolicy, getMasterOptimizer, getMasterOptimizerSafe, performOnExpression, performOnTarget, postPerform, postPerform, setDataChainsUpdatePolicy, verifyCfg
Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.AbstractOptimizer
addTag, getName, getPluginInformation, getPreferredExecutionStage, getPriority, getRequiredModeThreshold, getTags, getType, removeTag, setMasterOptimizer, setName, setPreferredExecutionStage, setPriority, setRequiredModeThreshold, setType
Methods inherited from class com.pnfsoftware.jeb.core.AbstractPlugin
dispose, getData, setData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.opt.IOptimizer
getPreferredExecutionStage, getPriority, getRequiredModeThreshold, getTags, getType, setMasterOptimizer
Methods inherited from interface com.pnfsoftware.jeb.core.IPlugin
dispose, getData, getPluginInformation, setData
-
Constructor Details
-
AbstractEBlockOptimizer
- Parameters:
dataChainsUpdatePolicy
- block optimizers should have a policy ofDataChainsUpdatePolicy.UPDATE_IF_OPTIMIZED
orDataChainsUpdatePolicy.UPDATE_IF_REQUIRED
-
-
Method Details
-
perform
protected int perform()Description copied from class:AbstractEOptimizer
Perform the optimization pass. The caller may request that data chains not be updated, whenever possible. (They may be updated internally by the optimizer, which has the final say as to how and when DFA calculations should be run.)The above means that data chains after running this method may or may not have been modified, and may or may not be in a consistent state with the optimized CFG.
- Specified by:
perform
in classAbstractEOptimizer
- Returns:
- the result of a call to one of
postPerform(...)
or a negative number indicating an error has occurred and the optimizing process should be aborted
-
optimizeBlock
Attempt to optimize a basic block. All instruction in the block may be modified.- Parameters:
b
- a basic block- Returns:
- the number of optimizations performed in the block; a negative value can be returned to indicate a transaction failure (critical error),
-