Search in sources :

Example 6 with FrameStateAssignmentPhase

use of org.graalvm.compiler.phases.common.FrameStateAssignmentPhase in project graal by oracle.

the class ReplacementsParseTest method testGraph.

@SuppressWarnings("try")
private void testGraph(String name) {
    StructuredGraph graph = parseEager(name, StructuredGraph.AllowAssumptions.YES);
    try (DebugContext.Scope s0 = graph.getDebug().scope(name, graph)) {
        for (OpaqueNode node : graph.getNodes().filter(OpaqueNode.class)) {
            node.replaceAndDelete(node.getValue());
        }
        HighTierContext context = getDefaultHighTierContext();
        CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
        new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
        new FloatingReadPhase().apply(graph);
        canonicalizer.apply(graph, context);
        new DeadCodeEliminationPhase().apply(graph);
        new GuardLoweringPhase().apply(graph, getDefaultMidTierContext());
        new FrameStateAssignmentPhase().apply(graph);
    } catch (Throwable e) {
        throw graph.getDebug().handle(e);
    }
}
Also used : FrameStateAssignmentPhase(org.graalvm.compiler.phases.common.FrameStateAssignmentPhase) StructuredGraph(org.graalvm.compiler.nodes.StructuredGraph) GuardLoweringPhase(org.graalvm.compiler.phases.common.GuardLoweringPhase) LoweringPhase(org.graalvm.compiler.phases.common.LoweringPhase) CanonicalizerPhase(org.graalvm.compiler.phases.common.CanonicalizerPhase) DebugContext(org.graalvm.compiler.debug.DebugContext) OpaqueNode(org.graalvm.compiler.nodes.debug.OpaqueNode) HighTierContext(org.graalvm.compiler.phases.tiers.HighTierContext) DeadCodeEliminationPhase(org.graalvm.compiler.phases.common.DeadCodeEliminationPhase) GuardLoweringPhase(org.graalvm.compiler.phases.common.GuardLoweringPhase) FloatingReadPhase(org.graalvm.compiler.phases.common.FloatingReadPhase)

Aggregations

FrameStateAssignmentPhase (org.graalvm.compiler.phases.common.FrameStateAssignmentPhase)6 CanonicalizerPhase (org.graalvm.compiler.phases.common.CanonicalizerPhase)5 GuardLoweringPhase (org.graalvm.compiler.phases.common.GuardLoweringPhase)5 LoweringPhase (org.graalvm.compiler.phases.common.LoweringPhase)5 DebugContext (org.graalvm.compiler.debug.DebugContext)4 StructuredGraph (org.graalvm.compiler.nodes.StructuredGraph)4 MidTierContext (org.graalvm.compiler.phases.tiers.MidTierContext)3 PhaseContext (org.graalvm.compiler.phases.tiers.PhaseContext)3 OptionValues (org.graalvm.compiler.options.OptionValues)2 DeadCodeEliminationPhase (org.graalvm.compiler.phases.common.DeadCodeEliminationPhase)2 FloatingReadPhase (org.graalvm.compiler.phases.common.FloatingReadPhase)2 RemoveValueProxyPhase (org.graalvm.compiler.phases.common.RemoveValueProxyPhase)2 List (java.util.List)1 ResolvedJavaMethod (jdk.vm.ci.meta.ResolvedJavaMethod)1 CompilationIdentifier (org.graalvm.compiler.core.common.CompilationIdentifier)1 Node (org.graalvm.compiler.graph.Node)1 LoopEx (org.graalvm.compiler.loop.LoopEx)1 LoopFragmentInside (org.graalvm.compiler.loop.LoopFragmentInside)1 LoopsData (org.graalvm.compiler.loop.LoopsData)1 BeginNode (org.graalvm.compiler.nodes.BeginNode)1