if (!unitChain.isEmpty()) { Unit entryPoint = unitChain.getFirst(); if (!heads.contains(entryPoint)) {
heads.addAll(additionalHeads); if (unitChain.isEmpty()) { throw new IllegalStateException("No body for method " + body.getMethod().getSignature());
void go() { if (!mUnits.isEmpty()) { buildUnitToBlockMap(); computeLocalDefsAndLocalUsesInfo(); if (debug) { logger.debug("Calling optimizeLoadStore(1)\n"); } optimizeLoadStores(); if (PhaseOptions.getBoolean(gOptions, "inter")) { if (debug) { logger.debug("Calling doInterBlockOptimizations"); } doInterBlockOptimizations(); // computeLocalDefsAndLocalUsesInfo(); // propagateLoadsBackwards(); if(debug) logger.debug("pass 3"); // optimizeLoadStores(); if(debug) logger.debug("pass 4"); // propagateLoadsForward(); if(debug) logger.debug("pass 5"); // propagateBackwardsIndependentHunk(); if(debug) logger.debug("pass 6"); } if (PhaseOptions.getBoolean(gOptions, "sl2") || PhaseOptions.getBoolean(gOptions, "sll2")) { mPass2 = true; if (debug) { logger.debug("Calling optimizeLoadStore(2)"); } optimizeLoadStores(); } } }
int numPruned = units.size(); Set<Unit> reachable = units.isEmpty() ? Collections.<Unit>emptySet() : reachable(units.getFirst(), graph);
= sm.getActiveBody().getTraps().isEmpty() ? null : new HashMap<Unit, Collection<Trap>>(); for (Trap t : sm.getActiveBody().getTraps()) { for (Iterator<Unit> unitIt = units.iterator(t.getBeginUnit(), units.getPredOf(t.getEndUnit())); unitIt.hasNext();) {
@Override protected void internalTransform(Body b, String phaseName, Map<String, String> options) { if (!b.getTraps().isEmpty()) { return;
Chain<SootClass> unprocessedClasses = new HashChain<SootClass>(getClasses()); unprocessedClasses.removeAll(processedClasses); if (unprocessedClasses.isEmpty()) { break;
if (units.isEmpty() || !(units.getLast() instanceof ReturnVoidStmt)) { units.add(Jimple.v().newReturnVoidStmt());
Chain<SootClass> unprocessedClasses = new HashChain<SootClass>(getClasses()); unprocessedClasses.removeAll(processedClasses); if( unprocessedClasses.isEmpty() ) break; processedClasses.addAll(unprocessedClasses); for (SootClass s : unprocessedClasses) {
Chain<SootClass> unprocessedClasses = new HashChain<SootClass>(getClasses()); unprocessedClasses.removeAll(processedClasses); if( unprocessedClasses.isEmpty() ) break; processedClasses.addAll(unprocessedClasses); for (SootClass s : unprocessedClasses) {
if (!body.getTraps().isEmpty()) { System.err.format("TODO: %d traps could not be removed for %s%n", body.getTraps().size(), body.getMethod().getSignature());