private static RopMethod optimizeMinimizeRegisters(RopMethod rmeth,int paramWidth,boolean isStatic,EnumSet<OptionalStep> steps){
  SsaMethod ssaMeth;
  RopMethod resultMeth;
  ssaMeth=SsaConverter.convertToSsaMethod(rmeth,paramWidth,isStatic);
  EnumSet<OptionalStep> newSteps=steps.clone();
  newSteps.remove(OptionalStep.CONST_COLLECTOR);
  runSsaFormSteps(ssaMeth,newSteps);
  resultMeth=SsaToRop.convertToRopMethod(ssaMeth,true);
  return resultMeth;
}

private static RopMethod optimizeMinimizeRegisters ( RopMethod rmeth , int paramWidth , boolean isStatic , EnumSet < OptionalStep > steps ) { SsaMethod ssaMeth ; RopMethod resultMeth ; ssaMeth = SsaConverter . convertToSsaMethod ( rmeth , paramWidth , isStatic ) ; EnumSet < OptionalStep > newSteps = steps . clone ( ) ; newSteps . remove ( OptionalStep . CONST_COLLECTOR ) ; runSsaFormSteps ( ssaMeth , newSteps ) ; resultMeth = SsaToRop . convertToRopMethod ( ssaMeth , true ) ; return resultMeth ; }
runs the optimizer with a strategy to minimize the number of rop - form registers used by the end result . dex bytecode does not have instruction forms that take register numbers larger than 15 for all instructions . if we ' ve produced a method that uses more than 16 registers , try again with a different strategy to see if we can get under the bar . the end result will be much more efficient .
