Search in sources :

Example 1 with AllocationContext

use of org.graalvm.compiler.lir.phases.AllocationPhase.AllocationContext in project graal by oracle.

the class GraalCompiler method emitLowLevel.

public static LIRGenerationResult emitLowLevel(TargetDescription target, LIRGenerationResult lirGenRes, LIRGeneratorTool lirGen, LIRSuites lirSuites, RegisterAllocationConfig registerAllocationConfig) {
    DebugContext debug = lirGenRes.getLIR().getDebug();
    PreAllocationOptimizationContext preAllocOptContext = new PreAllocationOptimizationContext(lirGen);
    lirSuites.getPreAllocationOptimizationStage().apply(target, lirGenRes, preAllocOptContext);
    debug.dump(DebugContext.BASIC_LEVEL, lirGenRes.getLIR(), "After PreAllocationOptimizationStage");
    AllocationContext allocContext = new AllocationContext(lirGen.getSpillMoveFactory(), registerAllocationConfig);
    lirSuites.getAllocationStage().apply(target, lirGenRes, allocContext);
    debug.dump(DebugContext.BASIC_LEVEL, lirGenRes.getLIR(), "After AllocationStage");
    PostAllocationOptimizationContext postAllocOptContext = new PostAllocationOptimizationContext(lirGen);
    lirSuites.getPostAllocationOptimizationStage().apply(target, lirGenRes, postAllocOptContext);
    debug.dump(DebugContext.BASIC_LEVEL, lirGenRes.getLIR(), "After PostAllocationOptimizationStage");
    return lirGenRes;
}
Also used : AllocationContext(org.graalvm.compiler.lir.phases.AllocationPhase.AllocationContext) PreAllocationOptimizationContext(org.graalvm.compiler.lir.phases.PreAllocationOptimizationPhase.PreAllocationOptimizationContext) PostAllocationOptimizationContext(org.graalvm.compiler.lir.phases.PostAllocationOptimizationPhase.PostAllocationOptimizationContext) DebugContext(org.graalvm.compiler.debug.DebugContext)

Aggregations

DebugContext (org.graalvm.compiler.debug.DebugContext)1 AllocationContext (org.graalvm.compiler.lir.phases.AllocationPhase.AllocationContext)1 PostAllocationOptimizationContext (org.graalvm.compiler.lir.phases.PostAllocationOptimizationPhase.PostAllocationOptimizationContext)1 PreAllocationOptimizationContext (org.graalvm.compiler.lir.phases.PreAllocationOptimizationPhase.PreAllocationOptimizationContext)1