soot.baf.toolkits.base
Class PeepholeOptimizer

java.lang.Object
  extended by soot.Transformer
      extended by soot.BodyTransformer
          extended by soot.baf.toolkits.base.PeepholeOptimizer

public class PeepholeOptimizer
extends BodyTransformer

Driver class to run peepholes on the Baf IR. The peepholes applied must implement the Peephole interface. Peepholes are loaded dynamically by the soot runtime; the runtime reads the file peephole.dat, in order to determine which peepholes to apply.

See Also:
Peephole, ExamplePeephole

Constructor Summary
PeepholeOptimizer(Singletons.Global g)
           
 
Method Summary
protected  void internalTransform(Body body, String phaseName, Map options)
          The method that drives the optimizations.
static PeepholeOptimizer v()
           
 
Methods inherited from class soot.BodyTransformer
transform, transform, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeepholeOptimizer

public PeepholeOptimizer(Singletons.Global g)
Method Detail

v

public static PeepholeOptimizer v()

internalTransform

protected void internalTransform(Body body,
                                 String phaseName,
                                 Map options)
The method that drives the optimizations.

Specified by:
internalTransform in class BodyTransformer
Parameters:
body - the body on which to apply the transformation
phaseName - the phasename for this transform; not typically used by implementations.
options - the actual computed options; a combination of default options and Scene specified options.