Search in sources :

Example 1 with CopyPropagation

use of soot.dava.toolkits.base.AST.traversals.CopyPropagation in project soot by Sable.

the class DavaBody method applyStructuralAnalyses.

private void applyStructuralAnalyses(ASTNode AST) {
    // TESTING REACHING DEFS
    // ReachingDefs defs = new ReachingDefs(AST);
    // AST.apply(new tester(true,defs));
    // TESTING REACHING COPIES
    // ReachingCopies copies = new ReachingCopies(AST);
    // AST.apply(new tester(true,copies));
    // TESTING ASTUSESANDDEFS
    // AST.apply(new ASTUsesAndDefs(AST));
    /*
		 * Structural flow analyses.....
		 */
    // CopyPropagation.DEBUG=true;
    debug("applyStructureAnalyses", "invoking copy propagation");
    CopyPropagation prop = new CopyPropagation(AST);
    AST.apply(prop);
    debug("applyStructureAnalyses", "invoking copy propagation DONE");
    // copy propagation should be followed by LocalVariableCleaner to get max effect
    // ASTUsesAndDefs.DEBUG=true;
    debug("applyStructureAnalyses", "Local Variable Cleaner started");
    AST.apply(new LocalVariableCleaner(AST));
    debug("applyStructureAnalyses", "Local Variable Cleaner DONE");
}
Also used : LocalVariableCleaner(soot.dava.toolkits.base.AST.transformations.LocalVariableCleaner) CopyPropagation(soot.dava.toolkits.base.AST.traversals.CopyPropagation)

Aggregations

LocalVariableCleaner (soot.dava.toolkits.base.AST.transformations.LocalVariableCleaner)1 CopyPropagation (soot.dava.toolkits.base.AST.traversals.CopyPropagation)1