at.dms.kjc.sir.lowering
Class FinalUnitOptimize
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FinalUnitOptimize
public FinalUnitOptimize()
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 occurrsmethod
- that we want to determine whether to optimize.
- Returns: