/** * Process a method. * * @param ssaMethod {@code non-null;} method to process */ public static void process(SsaMethod ssaMethod) { LiteralOpUpgrader dc; dc = new LiteralOpUpgrader(ssaMethod); dc.run(); }
private static void runSsaFormSteps(SsaMethod ssaMeth, EnumSet<OptionalStep> steps) { boolean needsDeadCodeRemover = true; if (steps.contains(OptionalStep.MOVE_PARAM_COMBINER)) { MoveParamCombiner.process(ssaMeth); } if (steps.contains(OptionalStep.SCCP)) { SCCP.process(ssaMeth); } if (steps.contains(OptionalStep.LITERAL_UPGRADE)) { LiteralOpUpgrader.process(ssaMeth); DeadCodeRemover.process(ssaMeth); needsDeadCodeRemover = false; } if (steps.contains(OptionalStep.CONST_COLLECTOR)) { ConstCollector.process(ssaMeth); DeadCodeRemover.process(ssaMeth); needsDeadCodeRemover = false; } // dead code remover must be run before phi type resolver if (needsDeadCodeRemover) { DeadCodeRemover.process(ssaMeth); } PhiTypeResolver.process(ssaMeth); }
if (type.isConstant() && type.getBasicType() == Type.BT_INT) { replacePlainInsn(insn, RegisterSpecList.EMPTY, RegOps.CONST, (Constant) type); NormalSsaInsn sourceInsn = (NormalSsaInsn) predInsns.get(predInsns.size()-1); replacePlainInsn(sourceInsn, RegisterSpecList.EMPTY, RegOps.GOTO, null);
LiteralOpUpgrader.process(ssaMeth); DeadCodeRemover.process(ssaMeth); needsDeadCodeRemover = false;
if (type.isConstant() && type.getBasicType() == Type.BT_INT) { replacePlainInsn(insn, RegisterSpecList.EMPTY, RegOps.CONST, (Constant) type); NormalSsaInsn sourceInsn = (NormalSsaInsn) predInsns.get(predInsns.size()-1); replacePlainInsn(sourceInsn, RegisterSpecList.EMPTY, RegOps.GOTO, null);
/** * Process a method. * * @param ssaMethod {@code non-null;} method to process */ public static void process(SsaMethod ssaMethod) { LiteralOpUpgrader dc; dc = new LiteralOpUpgrader(ssaMethod); dc.run(); }
LiteralOpUpgrader.process(ssaMeth); DeadCodeRemover.process(ssaMeth); needsDeadCodeRemover = false;
if (type.isConstant() && type.getBasicType() == Type.BT_INT) { replacePlainInsn(insn, RegisterSpecList.EMPTY, RegOps.CONST, (Constant) type); NormalSsaInsn sourceInsn = (NormalSsaInsn) predInsns.get(predInsns.size()-1); replacePlainInsn(sourceInsn, RegisterSpecList.EMPTY, RegOps.GOTO, null);
/** * Process a method. * * @param ssaMethod {@code non-null;} method to process */ public static void process(SsaMethod ssaMethod) { LiteralOpUpgrader dc; dc = new LiteralOpUpgrader(ssaMethod); dc.run(); }
LiteralOpUpgrader.process(ssaMeth); DeadCodeRemover.process(ssaMeth); needsDeadCodeRemover = false;
if (type.isConstant() && type.getBasicType() == Type.BT_INT) { replacePlainInsn(insn, RegisterSpecList.EMPTY, RegOps.CONST, (Constant) type); NormalSsaInsn sourceInsn = (NormalSsaInsn) predInsns.get(predInsns.size()-1); replacePlainInsn(sourceInsn, RegisterSpecList.EMPTY, RegOps.GOTO, null);
/** * Process a method. * * @param ssaMethod {@code non-null;} method to process */ public static void process(SsaMethod ssaMethod) { LiteralOpUpgrader dc; dc = new LiteralOpUpgrader(ssaMethod); dc.run(); }
LiteralOpUpgrader.process(ssaMeth); DeadCodeRemover.process(ssaMeth); needsDeadCodeRemover = false;
if (type.isConstant() && type.getBasicType() == Type.BT_INT) { replacePlainInsn(insn, RegisterSpecList.EMPTY, RegOps.CONST, (Constant) type); NormalSsaInsn sourceInsn = (NormalSsaInsn) predInsns.get(predInsns.size()-1); replacePlainInsn(sourceInsn, RegisterSpecList.EMPTY, RegOps.GOTO, null);
/** * Process a method. * * @param ssaMethod {@code non-null;} method to process */ public static void process(SsaMethod ssaMethod) { LiteralOpUpgrader dc; dc = new LiteralOpUpgrader(ssaMethod); dc.run(); }
LiteralOpUpgrader.process(ssaMeth); DeadCodeRemover.process(ssaMeth); needsDeadCodeRemover = false;
if (type.isConstant() && type.getBasicType() == Type.BT_INT) { replacePlainInsn(insn, RegisterSpecList.EMPTY, RegOps.CONST, (Constant) type); NormalSsaInsn sourceInsn = (NormalSsaInsn) predInsns.get(predInsns.size()-1); replacePlainInsn(sourceInsn, RegisterSpecList.EMPTY, RegOps.GOTO, null);
/** * Process a method. * * @param ssaMethod {@code non-null;} method to process */ public static void process(SsaMethod ssaMethod) { LiteralOpUpgrader dc; dc = new LiteralOpUpgrader(ssaMethod); dc.run(); }
LiteralOpUpgrader.process(ssaMeth); DeadCodeRemover.process(ssaMeth); needsDeadCodeRemover = false;
if (type.isConstant() && type.getBasicType() == Type.BT_INT) { replacePlainInsn(insn, RegisterSpecList.EMPTY, RegOps.CONST, (Constant) type); NormalSsaInsn sourceInsn = (NormalSsaInsn) predInsns.get(predInsns.size()-1); replacePlainInsn(sourceInsn, RegisterSpecList.EMPTY, RegOps.GOTO, null);