src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeExceptionTest.java
changeset 58877 aec7bf35d6f5
parent 52910 583fd71c47d6
equal deleted inserted replaced
58876:1a8d65e71a66 58877:aec7bf35d6f5
     1 /*
     1 /*
     2  * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    28 import java.util.Map;
    28 import java.util.Map;
    29 
    29 
    30 import org.graalvm.compiler.nodes.Invoke;
    30 import org.graalvm.compiler.nodes.Invoke;
    31 import org.graalvm.compiler.nodes.StructuredGraph;
    31 import org.graalvm.compiler.nodes.StructuredGraph;
    32 import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
    32 import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
    33 import org.graalvm.compiler.phases.common.CanonicalizerPhase;
       
    34 import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
    33 import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
    35 import org.graalvm.compiler.phases.tiers.HighTierContext;
    34 import org.graalvm.compiler.phases.tiers.HighTierContext;
    36 import org.junit.Test;
    35 import org.junit.Test;
    37 
    36 
    38 public class InvokeExceptionTest extends GraalCompilerTest {
    37 public class InvokeExceptionTest extends GraalCompilerTest {
    67         Map<Invoke, Double> hints = new HashMap<>();
    66         Map<Invoke, Double> hints = new HashMap<>();
    68         for (Invoke invoke : graph.getInvokes()) {
    67         for (Invoke invoke : graph.getInvokes()) {
    69             hints.put(invoke, 1000d);
    68             hints.put(invoke, 1000d);
    70         }
    69         }
    71         HighTierContext context = getDefaultHighTierContext();
    70         HighTierContext context = getDefaultHighTierContext();
    72         createInliningPhase(hints, new CanonicalizerPhase()).apply(graph, context);
    71         createInliningPhase(hints, createCanonicalizerPhase()).apply(graph, context);
    73         new CanonicalizerPhase().apply(graph, context);
    72         createCanonicalizerPhase().apply(graph, context);
    74         new DeadCodeEliminationPhase().apply(graph);
    73         new DeadCodeEliminationPhase().apply(graph);
    75     }
    74     }
    76 }
    75 }