public final class OptimizationPlanAtomicElement extends OptimizationPlanElement
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.
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
OptimizationPlanAtomicElement(CompilerPhase p) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
prettyPrintTimeprivate final CompilerPhase myPhase
protected long phaseNanos
public double counter1
public double counter2
public OptimizationPlanAtomicElement(CompilerPhase p)
public void initializeForMeasureCompilation()
initializeForMeasureCompilation in class OptimizationPlanElementpublic boolean shouldPerform(OptOptions options)
OptimizationPlanElementshouldPerform in class OptimizationPlanElementoptions - The Options object for the current compilation.true if the plan element should be performed.public void perform(IR ir)
OptimizationPlanElementperform in class OptimizationPlanElementir - The IR object to work with.public String getName()
getName in class OptimizationPlanElementpublic void reportStats(int indent, int timeCol, double totalTime)
OptimizationPlanElementreportStats in class OptimizationPlanElementindent - Number of spaces to indent report.timeCol - Column number of time portion of report.totalTime - Total opt compilation time in seconds.public double elapsedTime()
OptimizationPlanElementelapsedTime in class OptimizationPlanElement