public class OptimizationPlanner extends Object
The order of the compiler phases for MIR is handled separately for each architecture by the respective MIROptimizationPlanner.
Modifier and Type | Field and Description |
---|---|
private static OptimizationPlanElement[] |
masterPlan
The master optimization plan.
|
Constructor and Description |
---|
OptimizationPlanner() |
Modifier and Type | Method and Description |
---|---|
protected static void |
addComponent(ArrayList<OptimizationPlanElement> p,
CompilerPhase e) |
protected static void |
addComponent(ArrayList<OptimizationPlanElement> p,
OptimizationPlanElement e) |
private static void |
BC2HIR(ArrayList<OptimizationPlanElement> p)
This method defines the optimization plan elements required to
generate HIR from bytecodes.
|
protected static void |
composeComponents(ArrayList<OptimizationPlanElement> p,
String name,
Object[] es)
Add a set of optimization plan elements to a vector.
|
static OptimizationPlanElement[] |
createOptimizationPlan(OptOptions options)
Using the passed options create an optimization plan
by selecting a subset of the elements in the masterPlan.
|
static void |
generateOptimizingCompilerSubsystemReport(boolean explain)
Generate a report of time spent in various phases of the opt compiler.
|
private static void |
HIR2LIR(ArrayList<OptimizationPlanElement> p)
This method defines the optimization plan elements that
are to be performed to lower HIR to LIR.
|
private static void |
HIROptimizations(ArrayList<OptimizationPlanElement> p)
This method defines the optimization plan elements that
are to be performed on the HIR.
|
private static void |
initializeMasterPlan()
Initialize the "master plan", which holds all optimization elements
that will normally execute.
|
static void |
initializeMeasureCompilation()
This method is called to initialize all phases to support
measuring compilation.
|
private static void |
LIROptimizations(ArrayList<OptimizationPlanElement> p)
This method defines the optimization plan elements that
are to be performed on the LIR.
|
private static void |
SSAinHIR(ArrayList<OptimizationPlanElement> p)
This method defines the optimization plan elements that
are to be performed with SSA form on HIR.
|
private static void |
SSAinLIR(ArrayList<OptimizationPlanElement> p)
This method defines the optimization plan elements that
are to be performed with SSA form on LIR.
|
private static OptimizationPlanElement[] |
toArray(ArrayList<OptimizationPlanElement> planElementList)
Convert the ArrayList to an array of elements.
|
private static OptimizationPlanElement[] masterPlan
public OptimizationPlanner()
public static void generateOptimizingCompilerSubsystemReport(boolean explain)
NB: This method may be called in a context where classloading and/or GC cannot be allowed. Therefore we must use primitive sysWrites for output and avoid string appends and other allocations.
explain
- Should an explanation of the metrics be generated?public static OptimizationPlanElement[] createOptimizationPlan(OptOptions options)
options
- the Options to usepublic static void initializeMeasureCompilation()
private static void initializeMasterPlan()
private static OptimizationPlanElement[] toArray(ArrayList<OptimizationPlanElement> planElementList)
planElementList
- the array list to convert, must be non-null
private static void BC2HIR(ArrayList<OptimizationPlanElement> p)
p
- the plan under constructionprivate static void HIROptimizations(ArrayList<OptimizationPlanElement> p)
p
- the plan under constructionprivate static void SSAinHIR(ArrayList<OptimizationPlanElement> p)
p
- the plan under constructionprivate static void SSAinLIR(ArrayList<OptimizationPlanElement> p)
p
- the plan under constructionprivate static void HIR2LIR(ArrayList<OptimizationPlanElement> p)
p
- the plan under constructionprivate static void LIROptimizations(ArrayList<OptimizationPlanElement> p)
p
- the plan under constructionprotected static void addComponent(ArrayList<OptimizationPlanElement> p, CompilerPhase e)
protected static void addComponent(ArrayList<OptimizationPlanElement> p, OptimizationPlanElement e)
protected static void composeComponents(ArrayList<OptimizationPlanElement> p, String name, Object[] es)
p
- the vector to add toname
- the name for this compositiones
- the array of composed elements