|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.driver.OptimizationPlanElement
public abstract class OptimizationPlanElement
An element in the opt compiler's optimization plan.
NOTE: Instances of subclasses of this class are held in OptimizationPlanner.masterPlan and thus represent global state. It is therefore incorrect for any per-compilation state to be stored in an instance field of one of these objects.
TODO: refactor the optimization plan elements and compiler phases
Constructor Summary | |
---|---|
OptimizationPlanElement()
|
Method Summary | |
---|---|
abstract double |
elapsedTime()
Report the elapsed time spent in the PlanElement |
abstract String |
getName()
|
abstract void |
initializeForMeasureCompilation()
This method is called to initialize the optimization plan support measuring compilation. |
abstract void |
perform(IR ir)
Do the work represented by this element in the optimization plan. |
protected void |
prettyPrintTime(double time,
double totalTime)
Helper function for reportStats |
abstract void |
reportStats(int indent,
int timeCol,
double totalTime)
Generate (to the sysWrite stream) a report of the time spent performing this element of the optimization plan. |
abstract boolean |
shouldPerform(OptOptions options)
Determine, possibly by consulting the passed options object, if this optimization plan element should be performed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OptimizationPlanElement()
Method Detail |
---|
public abstract boolean shouldPerform(OptOptions options)
options
- The Options object for the current compilation.
true
if the plan element should be performed.public abstract void perform(IR ir)
ir
- The IR object to work with.public abstract String getName()
public abstract void initializeForMeasureCompilation()
public abstract void reportStats(int indent, int timeCol, double totalTime)
indent
- Number of spaces to indent report.timeCol
- Column number of time portion of report.totalTime
- Total opt compilation time in seconds.public abstract double elapsedTime()
protected void prettyPrintTime(double time, double totalTime)
reportStats
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |