|
|||||||||||
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 org.jikesrvm.compilers.opt.driver.OptimizationPlanAtomicElement
public final class OptimizationPlanAtomicElement
An element in the opt compiler's optimization plan that consists of a single CompilerPhase.
NOTE: Instances 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.
Field Summary | |
---|---|
double |
counter1
Counters to be used by myPhase to gather phase specific stats. |
double |
counter2
Counters to be used by myPhase to gather phase specific stats. |
private CompilerPhase |
myPhase
The phase to be performed. |
protected long |
phaseNanos
Accumulated nanoseconds spent in the element. |
Constructor Summary | |
---|---|
OptimizationPlanAtomicElement(CompilerPhase p)
Create a plan element corresponding to a particular compiler phase. |
Method Summary | |
---|---|
double |
elapsedTime()
Report the elapsed time spent in the PlanElement |
String |
getName()
|
void |
initializeForMeasureCompilation()
Update this phase to support the measuring of compilation |
void |
perform(IR ir)
Do the work represented by this element in the optimization plan. |
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. |
boolean |
shouldPerform(OptOptions options)
Determine, possibly by consulting the passed options object, if this optimization plan element should be performed. |
Methods inherited from class org.jikesrvm.compilers.opt.driver.OptimizationPlanElement |
---|
prettyPrintTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final CompilerPhase myPhase
protected long phaseNanos
public double counter1
public double counter2
Constructor Detail |
---|
public OptimizationPlanAtomicElement(CompilerPhase p)
p
- Method Detail |
---|
public void initializeForMeasureCompilation()
initializeForMeasureCompilation
in class OptimizationPlanElement
public boolean shouldPerform(OptOptions options)
OptimizationPlanElement
shouldPerform
in class OptimizationPlanElement
options
- The Options object for the current compilation.
true
if the plan element should be performed.public void perform(IR ir)
OptimizationPlanElement
perform
in class OptimizationPlanElement
ir
- The IR object to work with.public String getName()
getName
in class OptimizationPlanElement
public void reportStats(int indent, int timeCol, double totalTime)
OptimizationPlanElement
reportStats
in class OptimizationPlanElement
indent
- Number of spaces to indent report.timeCol
- Column number of time portion of report.totalTime
- Total opt compilation time in seconds.public double elapsedTime()
OptimizationPlanElement
elapsedTime
in class OptimizationPlanElement
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |