at.dms.kjc.sir.lowering
Class FinalUnitOptimize

java.lang.Object
  extended by at.dms.kjc.sir.lowering.FinalUnitOptimize

public class FinalUnitOptimize
extends Object

Final agressive filter optimization before code emission. Unroller, Propagate, BlockFlattener, ArrayDestroyer (locals), VarDeclRaiser on each method. ArrayDestroyer (fields, if option set), DeadCodeElimination on the code unit as a whole. Refactored out of cluster, raw, spacedynamic, spacetime backends. Also existed in rstream backend but commented out.

Author:
Allyn Dimock

Constructor Summary
FinalUnitOptimize()
           
 
Method Summary
 void optimize(SIRCodeUnit unit)
          Loop over all methods in a code unit optimizing all vetted by optimizeThisMethod running standard optimization passes as mentioned in class header.
protected  boolean optimizeThisMethod(SIRCodeUnit unit, JMethodDeclaration method)
          To not optimize method of unit return false from this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FinalUnitOptimize

public FinalUnitOptimize()
Method Detail

optimize

public void optimize(SIRCodeUnit unit)
Loop over all methods in a code unit optimizing all vetted by optimizeThisMethod running standard optimization passes as mentioned in class header.

Parameters:
unit - SIRCodeUnit to process.

optimizeThisMethod

protected boolean optimizeThisMethod(SIRCodeUnit unit,
                                     JMethodDeclaration method)
To not optimize method of unit return false from this method. Made to be overridden.

Parameters:
unit - SIRCodeUnit in which the method occurrs
method - that we want to determine whether to optimize.
Returns: