forge.transform
Class UnrollTransformer

java.lang.Object
  extended by forge.transform.UnrollTransformer
All Implemented Interfaces:
Transformer

public final class UnrollTransformer
extends java.lang.Object
implements Transformer

Transformer that unrolls loops of the procedure and all called procedures.

Author:
Greg Dennis (gdennis@mit.edu)

Field Summary
 
Fields inherited from interface forge.transform.Transformer
IDENTITY
 
Constructor Summary
UnrollTransformer(int numUnrolls)
          Constructs a loop unroller that unrolls for the given number of times.
 
Method Summary
 CFGStmt sourceStmt(CFGStmt targetStmt)
          Returns the source update from which the given target was transformed.
 ForgeCFG transform(ForgeCFG source)
          Performs the transformation and returns the transformed procedure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnrollTransformer

public UnrollTransformer(int numUnrolls)
Constructs a loop unroller that unrolls for the given number of times.

Throws:
java.lang.IllegalArgumentException - - numUnrolls < 1
Method Detail

transform

public ForgeCFG transform(ForgeCFG source)
Description copied from interface: Transformer
Performs the transformation and returns the transformed procedure. The returned procedure may be == to the give procedure.

Specified by:
transform in interface Transformer

sourceStmt

public CFGStmt sourceStmt(CFGStmt targetStmt)
Description copied from interface: Transformer
Returns the source update from which the given target was transformed.

Specified by:
sourceStmt in interface Transformer