com.android.dx.ssa
Class Optimizer
java.lang.Object
com.android.dx.ssa.Optimizer
public class Optimizer
- extends Object
Runs a method through the SSA form conversion, any optimization algorithms,
and returns it to rop form.
|
Method Summary |
static SsaMethod |
debugDeadCodeRemover(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice)
|
static SsaMethod |
debugEdgeSplit(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice)
|
static SsaMethod |
debugNoRegisterAllocation(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice,
EnumSet<Optimizer.OptionalStep> steps)
|
static SsaMethod |
debugPhiPlacement(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice)
|
static SsaMethod |
debugRenaming(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice)
|
static TranslationAdvice |
getAdvice()
|
static boolean |
getPreserveLocals()
|
static RopMethod |
optimize(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice)
Runs optimization algorthims over this method, and returns a new
instance of RopMethod with the changes. |
static RopMethod |
optimize(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice,
EnumSet<Optimizer.OptionalStep> steps)
Runs optimization algorthims over this method, and returns a new
instance of RopMethod with the changes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Optimizer
public Optimizer()
getPreserveLocals
public static boolean getPreserveLocals()
- Returns:
- true if local variable information should be preserved, even
at code size/register size cost
getAdvice
public static TranslationAdvice getAdvice()
- Returns:
non-null; translation advice
optimize
public static RopMethod optimize(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice)
- Runs optimization algorthims over this method, and returns a new
instance of RopMethod with the changes.
- Parameters:
rmeth - method to processparamWidth - the total width, in register-units, of this method's
parametersisStatic - true if this method has no 'this' pointer argument.inPreserveLocals - true if local variable info should be preserved,
at the cost of some registers and insnsinAdvice - non-null; translation advice
- Returns:
- optimized method
optimize
public static RopMethod optimize(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice,
EnumSet<Optimizer.OptionalStep> steps)
- Runs optimization algorthims over this method, and returns a new
instance of RopMethod with the changes.
- Parameters:
rmeth - method to processparamWidth - the total width, in register-units, of this method's
parametersisStatic - true if this method has no 'this' pointer argument.inPreserveLocals - true if local variable info should be preserved,
at the cost of some registers and insnsinAdvice - non-null; translation advicesteps - set of optional optimization steps to run
- Returns:
- optimized method
debugEdgeSplit
public static SsaMethod debugEdgeSplit(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice)
debugPhiPlacement
public static SsaMethod debugPhiPlacement(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice)
debugRenaming
public static SsaMethod debugRenaming(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice)
debugDeadCodeRemover
public static SsaMethod debugDeadCodeRemover(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice)
debugNoRegisterAllocation
public static SsaMethod debugNoRegisterAllocation(RopMethod rmeth,
int paramWidth,
boolean isStatic,
boolean inPreserveLocals,
TranslationAdvice inAdvice,
EnumSet<Optimizer.OptionalStep> steps)
Copyright © 2013. All Rights Reserved.