|
|||||||||||
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.OptimizationPlanCompositeElement
public class OptimizationPlanCompositeElement
An element in the opt compiler's optimization plan that aggregates together other OptimizationPlan elements.
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.
Field Summary | |
---|---|
private OptimizationPlanElement[] |
myElements
Ordered list of elements that together comprise this element. |
private String |
myName
Name of this element. |
Constructor Summary | |
---|---|
OptimizationPlanCompositeElement(String n,
Object[] e)
Compose together the argument elements into a composite element of an optimization plan. |
|
OptimizationPlanCompositeElement(String n,
OptimizationPlanElement[] e)
Compose together the argument elements into a composite element of an optimization plan. |
Method Summary | |
---|---|
static OptimizationPlanCompositeElement |
compose(String name,
Object[] elems)
Compose together the argument elements into a composite element of an optimization plan. |
double |
elapsedTime()
Report the elapsed time spent in the PlanElement |
String |
getName()
|
void |
initializeForMeasureCompilation()
This method is called to initialize the optimization plan support measuring compilation. |
void |
perform(IR ir)
Do the work represented by this element in the optimization plan. |
boolean |
printingEnabled(OptOptions options,
boolean before)
Returns true if the phase wants the IR dumped before and/or after it runs. |
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 String myName
private final OptimizationPlanElement[] myElements
Constructor Detail |
---|
public OptimizationPlanCompositeElement(String n, OptimizationPlanElement[] e)
n
- The name for this phasee
- The elements to composepublic OptimizationPlanCompositeElement(String n, Object[] e)
n
- The name for this phasee
- The elements to composeMethod Detail |
---|
public void initializeForMeasureCompilation()
OptimizationPlanElement
initializeForMeasureCompilation
in class OptimizationPlanElement
public static OptimizationPlanCompositeElement compose(String name, Object[] elems)
name
- The name associated with this composite.elems
- An Object[] of CompilerPhases or
OptimizationPlanElements to be composed
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 boolean printingEnabled(OptOptions options, boolean before)
options
- the compiler options for the compilationbefore
- true when invoked before perform, false otherwise.
true
if the IR should be printed, false
otherwise.public final void perform(IR ir)
OptimizationPlanElement
perform
in class OptimizationPlanElement
ir
- The IR object to work with.public String getName()
getName
in class OptimizationPlanElement
public final 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 |