Class 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
    • Method Detail

      • internalTransform

        protected void internalTransform​(Body body,
                                         String phaseName,
                                         Map<String,​String> 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.