Search in sources :

Example 1 with ReorderingPhase

use of org.jikesrvm.compilers.opt.controlflow.ReorderingPhase in project JikesRVM by JikesRVM.

the class OptimizationPlanner method LIROptimizations.

/**
 * This method defines the optimization plan elements that
 * are to be performed on the LIR.
 *
 * @param p the plan under construction
 */
private static void LIROptimizations(ArrayList<OptimizationPlanElement> p) {
    // SSA meta-phase
    SSAinLIR(p);
    // Perform local copy propagation for a factored basic block.
    addComponent(p, new LocalCopyProp());
    // Perform local constant propagation for a factored basic block.
    addComponent(p, new LocalConstantProp());
    // Perform local common-subexpression elimination for a factored basic block.
    addComponent(p, new LocalCSE(false));
    // Simple flow-insensitive optimizations
    addComponent(p, new Simple(0, false, false, false, VM.BuildForIA32));
    // Use the LST to estimate basic block frequency
    addComponent(p, new OptimizationPlanCompositeElement("Basic Block Frequency Estimation", new Object[] { new BuildLST(), new EstimateBlockFrequencies() }));
    // Perform basic block reordering
    addComponent(p, new ReorderingPhase());
    // Perform peephole branch optimizations
    addComponent(p, new BranchOptimizations(0, false, true));
    if (VM.BuildForAdaptiveSystem) {
        // Arnold & Ryder instrumentation sampling framework
        addComponent(p, new InstrumentationSamplingFramework());
        // Convert high level place holder instructions into actual instrumentation
        addComponent(p, new LowerInstrumentation());
    }
}
Also used : LowerInstrumentation(org.jikesrvm.adaptive.recompilation.instrumentation.LowerInstrumentation) LocalCopyProp(org.jikesrvm.compilers.opt.LocalCopyProp) ReorderingPhase(org.jikesrvm.compilers.opt.controlflow.ReorderingPhase) EstimateBlockFrequencies(org.jikesrvm.compilers.opt.controlflow.EstimateBlockFrequencies) BuildLST(org.jikesrvm.compilers.opt.controlflow.BuildLST) LocalConstantProp(org.jikesrvm.compilers.opt.LocalConstantProp) InstrumentationSamplingFramework(org.jikesrvm.adaptive.recompilation.instrumentation.InstrumentationSamplingFramework) LocalCSE(org.jikesrvm.compilers.opt.LocalCSE) Simple(org.jikesrvm.compilers.opt.Simple) BranchOptimizations(org.jikesrvm.compilers.opt.controlflow.BranchOptimizations)

Aggregations

InstrumentationSamplingFramework (org.jikesrvm.adaptive.recompilation.instrumentation.InstrumentationSamplingFramework)1 LowerInstrumentation (org.jikesrvm.adaptive.recompilation.instrumentation.LowerInstrumentation)1 LocalCSE (org.jikesrvm.compilers.opt.LocalCSE)1 LocalConstantProp (org.jikesrvm.compilers.opt.LocalConstantProp)1 LocalCopyProp (org.jikesrvm.compilers.opt.LocalCopyProp)1 Simple (org.jikesrvm.compilers.opt.Simple)1 BranchOptimizations (org.jikesrvm.compilers.opt.controlflow.BranchOptimizations)1 BuildLST (org.jikesrvm.compilers.opt.controlflow.BuildLST)1 EstimateBlockFrequencies (org.jikesrvm.compilers.opt.controlflow.EstimateBlockFrequencies)1 ReorderingPhase (org.jikesrvm.compilers.opt.controlflow.ReorderingPhase)1