Search in sources :

Example 1 with ExpandCallingConvention

use of org.jikesrvm.compilers.opt.regalloc.ExpandCallingConvention in project JikesRVM by JikesRVM.

the class MIROptimizationPlanner method MIROptimizations.

/**
 * This method defines the optimization plan elements that
 * are to be performed on IA32 MIR.
 *
 * @param p the plan under construction
 */
private static void MIROptimizations(ArrayList<OptimizationPlanElement> p) {
    // Register Allocation
    composeComponents(p, "Register Mapping", new Object[] { new RewriteMemoryOperandsWithOversizedDisplacements(), new MIRSplitRanges(), // MANDATORY: Expand calling convention
    new ExpandCallingConvention(), // MANDATORY: Insert defs/uses due to floating-point stack
    new ExpandFPRStackConvention(), // MANDATORY: Perform Live analysis and create GC maps
    new LiveAnalysis(true, false), // MANDATORY: Perform register allocation
    new RegisterAllocator(), // MANDATORY: Add prologue and epilogue
    new PrologueEpilogueCreator() });
    // Peephole branch optimizations
    addComponent(p, new MIRBranchOptimizations(1));
}
Also used : RegisterAllocator(org.jikesrvm.compilers.opt.regalloc.RegisterAllocator) PrologueEpilogueCreator(org.jikesrvm.compilers.opt.regalloc.PrologueEpilogueCreator) RewriteMemoryOperandsWithOversizedDisplacements(org.jikesrvm.compilers.opt.regalloc.ia32.RewriteMemoryOperandsWithOversizedDisplacements) LiveAnalysis(org.jikesrvm.compilers.opt.liveness.LiveAnalysis) MIRBranchOptimizations(org.jikesrvm.compilers.opt.controlflow.MIRBranchOptimizations) ExpandCallingConvention(org.jikesrvm.compilers.opt.regalloc.ExpandCallingConvention) ExpandFPRStackConvention(org.jikesrvm.compilers.opt.regalloc.ia32.ExpandFPRStackConvention) MIRSplitRanges(org.jikesrvm.compilers.opt.regalloc.ia32.MIRSplitRanges)

Example 2 with ExpandCallingConvention

use of org.jikesrvm.compilers.opt.regalloc.ExpandCallingConvention in project JikesRVM by JikesRVM.

the class MIROptimizationPlanner method MIROptimizations.

/**
 * This method defines the optimization plan elements that
 * are to be performed on PowerPC MIR.
 *
 * @param p the plan under construction
 */
private static void MIROptimizations(ArrayList<OptimizationPlanElement> p) {
    // //////////////////
    // MIR OPTS(1) (before register allocation)
    // //////////////////
    // currently nothing to do
    // //////////////////
    // GCMapping part1 and RegisterAllocation
    // //////////////////
    composeComponents(p, "Register Mapping", new Object[] { // MANDATORY: Expand calling convention
    new ExpandCallingConvention(), // MANDATORY: Perform Live analysis and create GC maps
    new LiveAnalysis(true, false), // MANDATORY: Perform register allocation
    new RegisterAllocator(), // MANDATORY: Add prologue and epilogue
    new PrologueEpilogueCreator() });
    // //////////////////
    // MIR OPTS(2) (after register allocation)
    // NOTE: GCMapping part 1 has created the GC maps already.
    // From now until the end of compilation, we cannot change
    // the set of live references at a GC point
    // without updating the GCMaps.
    // Effectively this means that we can only do the
    // most trivial optimizations from
    // here on out without having to some potentially complex bookkeeping.
    // //////////////////
    // Peephole branch optimizations
    addComponent(p, new MIRBranchOptimizations(1));
}
Also used : RegisterAllocator(org.jikesrvm.compilers.opt.regalloc.RegisterAllocator) PrologueEpilogueCreator(org.jikesrvm.compilers.opt.regalloc.PrologueEpilogueCreator) LiveAnalysis(org.jikesrvm.compilers.opt.liveness.LiveAnalysis) MIRBranchOptimizations(org.jikesrvm.compilers.opt.controlflow.MIRBranchOptimizations) ExpandCallingConvention(org.jikesrvm.compilers.opt.regalloc.ExpandCallingConvention)

Aggregations

MIRBranchOptimizations (org.jikesrvm.compilers.opt.controlflow.MIRBranchOptimizations)2 LiveAnalysis (org.jikesrvm.compilers.opt.liveness.LiveAnalysis)2 ExpandCallingConvention (org.jikesrvm.compilers.opt.regalloc.ExpandCallingConvention)2 PrologueEpilogueCreator (org.jikesrvm.compilers.opt.regalloc.PrologueEpilogueCreator)2 RegisterAllocator (org.jikesrvm.compilers.opt.regalloc.RegisterAllocator)2 ExpandFPRStackConvention (org.jikesrvm.compilers.opt.regalloc.ia32.ExpandFPRStackConvention)1 MIRSplitRanges (org.jikesrvm.compilers.opt.regalloc.ia32.MIRSplitRanges)1 RewriteMemoryOperandsWithOversizedDisplacements (org.jikesrvm.compilers.opt.regalloc.ia32.RewriteMemoryOperandsWithOversizedDisplacements)1