ptolemy.copernicus.java
Class ConstantLoopUnroller

java.lang.Object
  extended by soot.Transformer
      extended by soot.BodyTransformer
          extended by ptolemy.copernicus.java.ConstantLoopUnroller

public class ConstantLoopUnroller
extends soot.BodyTransformer

A Transformer that attempts to determine the bounds of a loop at compile time, and then unroll the loop. In terms of code generation, the primary value of this transformation is that it reduces the control logic of the source code, which can increase the power of other compile-time optimizations.

Since:
Ptolemy II 2.0
Version:
$Id: ConstantLoopUnroller.java,v 1.38 2007/12/06 18:28:47 cxh Exp $
Author:
Stephen Neuendorffer
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (cxh)

Method Summary
protected  void internalTransform(soot.Body body, java.lang.String phaseName, java.util.Map options)
           
protected  void internalTransform(java.lang.String phaseName, java.util.Map options)
           
static ConstantLoopUnroller v()
          Return an instance of this transformer that will operate on the given model.
 
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
 

Method Detail

v

public static ConstantLoopUnroller v()
Return an instance of this transformer that will operate on the given model. The model is assumed to already have been properly initialized so that resolved types and other static properties of the model can be inspected.


internalTransform

protected void internalTransform(java.lang.String phaseName,
                                 java.util.Map options)

internalTransform

protected void internalTransform(soot.Body body,
                                 java.lang.String phaseName,
                                 java.util.Map options)
Specified by:
internalTransform in class soot.BodyTransformer